Question: 1 . Using the om database, write a SQL statement that returns three columns. 1 . 1 . The first column should contain the customer
Using the om database, write a SQL statement that returns three columns.
The first column should contain the customers first name and last name with a space between
them. Order the results by the customers last name then first name.
Make the heading at the top of the column: name.
The second column should contain the customers address.
Make the heading at the top of the column: street address.
The third column should contain the customers city, state, and zip code. There should be a
comma and a space after the city and a space after the state.
Make the heading at the top of the column: city, state zip.
Using the om database, write a SQL statement that returns the customer id and the difference in
days from the date the order shipped and the date the customer placed the order.
Make the heading for the difference in days column: days to ship.
List the results with the longest time to ship at the top.
Using the om database, write a SQL statement that returns the artists name, title, and price of
each title.
Make the heading for the price column: price.
Sort the results by artist, then title.
Using the ap database, write a SQL statement that returns three columns.
The first column should contain the invoice date.
The second column should contain the result of invoice total payment total credit total.
Make the heading for the second column: amount due.
The third column should contain the invoice due date.
Return only the invoices where the invoice due date is in the month of August and where
the amount due is greater than zero.
Using the ap database, write a SQL statement that returns the invoice id invoice due date, and the
payment date for all invoices paid after the due date.
Format all dates as twodigit day of the month, threeletter month, and four digit year for
example: May
Order the results by the invoice due date
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
