PAINTERPAINTINGGALLERYBasic SQLSQL with aggregationDatabase DesignCmpE 226 Practice Problem (4)The Gallery ExercisePAINTERID NAME PHONE123 Ross 888-4567126 Itero 345-1122234 Picasso 456-3345335 O ’Keefe 567-8999456 Miro 777-7777PAINTINGPNUM TITLE PRICE ID2345 Wild Waters245.00 1264536 Sea Storm 8359.00 3356666 Wild Waters6799.00 2347878 High Tide 98,000.004566789 Paradise 590,000.002347896 Faded Rose145.00 1239889 Sunset 975,000.00234GALLERYPNUM OWNER2345 Johnson6666 Johnson4536 McCloud7878 McCloud6789 Palmer7896 Palmer9889 PalmerExpress the following queries in SQL using the gallery database.Basic SQL(a) Find the names of the painters.(b) Find the owners of any gallery.(c) Find the name and phone number of the painter with id 123.(d) Find the price of the painting with title ”Paradise ”.(e) Find the name of the painter of each painting (title).(f) Find the gallery owner of each painting.(g) Find the titles of the paintings in Palmer ’s gallery.(h) Find the name of the painters who have a painting in Palmer ’s Gallery.(i) Find the owner of all paintings in the gallery that cost more that $100,000.00.SQL with aggregation(j) Find the average price of all Picasso paintings listed.(k) Find the total price of the paintings in each gallery.(l) Find the number of paintings in each gallery.(m) Find the price of the most expensive
View Full Document