Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write an SQL statement to show the sum of PreTaxAmount for each artist (Hint: The result will have only one line per each artist). Use
- Write an SQL statement to show the sum of PreTaxAmount for each artist (Hint: The result will have only one line per each artist). Use a join using JOIN ON syntax, and sort the results by ArtistLastName and then ArtistFirstName in ascending order. Note that this should include the full PreTaxAmount for any purchase in which the artist had an item, even if other items in the purchase were created by other artists.
- Write an SQL statement to show the sum of PreTaxAmount for each artist, as in Part N, but exclude any purchases with PreTaxAmount greater than $25. Use a join using JOIN ON syntax, and sort the results by ArtistLastName and then ArtistFirstName in descending order.
- Write an SQL statement to show which customers bought which items, and include any items that have not been sold. Include CUSTOMER.LastName, CUSTOMER. FirstName, InvoiceNumber, InvoiceDate, ItemNumber, ItemDescription, ArtistLastName, and ArtistFirstName. Use a join using JOIN ON syntax, and sort the results by ArtistLastName and ArtistFirstName in ascending order. Note that in Microsoft Access this requires multiple queries.
- Write an SQL statement to modify all ITEM rows with an artist last name of Baxter to an artist first name of Rex.
- Write SQL statements to switch the values of ArtistLastName so that all rows currently having the value Baker will have the value Baxter and all rows currently having the value Baxter will have the value Baker.
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