Question
I need to find out what are the queries are supposed to look like. Everywhere is showing very different things and I'm not sure how
I need to find out what are the queries are supposed to look like. Everywhere is showing very different things and I'm not sure how to do this properly. Pls help.
Instructions:
In this assignment you are going to create multi-table select statements to query the tables that you created a previous assignment. You will use the SQL Workshop - SQL Scripts page to create a single script file to complete the assignment.
Save your script to a file named LastName_FirstName_Functions.sql (where LastName is your last name and FirstName is your first name). Once you create the script in APEX, you will have the ability to save it and download for submission. Your script should be well-formatted and should contain comments regarding what the particular section of the script is supposed to do. See the file sample_script.PNG for suggested script format.
Complete the following objectives using APEX:
Background Information:
You have been contracted by a small company named DJ's on Demand to create a database for storing information on their jobs, event venues, partners, clients, and music catalog.
Assignment Deliverable:
Create separate select statements to query data to answer each question. Be sure to place a single-line comment before each question to identify the question being answered.
(6 points each, 48 points total)
- Write a query that will show the average cost of the DJ's on Demand events. Round to two decimal places.Write a query to a list of all the DJ's on Demand CD titles that have a as the second letter in the title.
- Write a query to display the number of months between the event_date of EVENT_ID 105 and todays date in the DJ's on Demand database. Round to the nearest month.
- Write a query that will display the DJ's on Demand CD titles for CD_NUMBER 90 and 91 in UPPERCASE in a column aliased as DJs on Demand Collections.
- Write a query to create usernames for the DJ's on Demand partners. The usernames will be the lowercase last name + the lowercase first letter in the first name. Alias the column as "user_name." For example, Mary Smythers would be smythersm.
- Write a query that will show the total cost of the DJ's on Demand events.
- Using a DECODE and the DJ's on Demand D_SONGS table, create a query that replaces the 2-minute songs with shortest and the 10-minute songs with longest. Label the output column.
- For all null values in the specialty column in the DJ's on Demand d_partners table, write a query to substitute No Specialty. Show the first name and specialty columns only.
- Write a query that will format the DJ's on Demand d_packages columns, low-range and high-range package costs, in the format $2500.00.
See the rubric for the points breakdown. This assignment is worth 48 points total.
Submitting your Assignment:
- Click the Submit Assignment button.
- Click the Choose File button and upload the following files:
- LastName_FirstName_Functions.sql - this file should contain all of your scripts.
- Click the Submit Assignment button to submit.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started