[solved]-Need Help Sql Questions Please Column Names Tables Menu Menuid Menuitemname Menuprice Orde Q39046990
Need help with these SQL questions, please!





Here are the column names for the tables:
menu
menu.id
menu.item_name
menu.price

order_detail
order_detail.orderid
order_detail.menuid
order_detail.qty
order_detail.time_in

order_main
order_main.id
order_main.empid
order_main.order_date
order_main.time_in
order_main.section

NOTE: THESE ARE NOT THE ENTIRE TABLES IN SQL, JUST THE FIRST 5COLUMNS OF EACH ONE
Question 1 “What are our top selling items? Please show me the item name, item price, and number sold, but limit it to only just the top ten (10) and list them in order of number sold and item price.” (Hint: Google how to limit results returned.) Your results should match this exactly: I price | qty item name |Salted Butter | Pepper Pasta įStrawberry-Rhubarb Crisp | Bread with Compote Butter | Fruit Salad Deluxe with Fruit Sunset Appetizer | Lettuce Wraps Crackers with Cheese Nescafe Espresso iBar Peanuts 1.83 3743 1.63 3742 1.98 3739 6.66 3719 3.88 3718 3.34 3717 8.35 3717 3.30 3713 | 9.96 3675 2.75 3671 10 rows in set Question 2 “Great! Include now how much were the total sales for these items?” Your results should match this exactly: | total sales l I price | gty item name Salted Butter | Pepper Pasta | Strawberry-Rhubarb Crisp | Bread wi th Compote Butter | Fruit Salad Deluxe with Fruit | | Sunset Appetizer Lettuce Wraps |Crackers with Cheese | Nescafe Espresso | Bar Peanuts 6849.69 I 1.83 3743 | 6099.46 I 1.63 3742 | 1.98 | 3739 | 6.66 3719 | 7403.22 | 24768.54 I 3.88 3718 | 3.34 3717 | 8.35| 3717 | 3.30 3713 | 9.96 | 3675 | 2.75| 3671 | 14425.84| 12414.78 31036.95 I 12252.90 | 36603.00 I 10095.25| + 10 rows in set Question 3 “Hmm, our top seller is not the top total sales. Please show me the top ten sales in order of total sales amount.” Your results should match this exactly: I price | qty | total sales | | item name +– ——-+—– + | Nescafe Espresso Wine by the Glass Goat Cheese |Fancy Feast | Bread with Butter | Sugar Pie | Marjoram (Just Marjoram) I | Tiramisu Cheesecake | Lettuce Wraps | Orange Chicken | 9.96 | 3675 | 9.81 | 3579 | 9.81 3546 | 9.75 3540 | 9.36 3645 | | 9.29 | 3590 | 9.75 | 3409 | 8.47 3669 | 8.35 | 3717 | 9.16 | 3379 | 36603.00| 35109.99 I 34786.26| 34515.00 I 34117.20 | 33351.10| 33237.75| 31076.43| 31036.95 | 30951.64I —– 10 rows in set Question 4 “Great! So Nescafe Espresso is our top seller. Can you show how many we sell each day of the week in the order of the quantity?” Your results should match this exactly: +- | day | gty + | Sun 779 735 Mon Tue 566 486 I 446 I 367 | 296 I Sat | Fri Thu | Wed +– +—–+ 7 rows in set Question 5 “So how have our Sunday sales (total qty and total sales price) for Nescafe Espresso performed over the years?” Your results should match this exactly: + I year gty -+ I total sales | -+ | 2012 I | 2011 | | 2010 I | 2009 | | 2008 | | 2007 | 2006 I 2005 I | 2004 I | 2003 | 127 I 96 101 I 56 107 I 64 5 I 1264.92 956.16 1005.96 | 557.76 1065.72 | 637.44 49.80 69.72 | 1693.20 T 458.16 170 46 -+ 10 rows in set –+ | id | item name | price | -+ I 1| Cheese Sticks 2 I Pepper Pasta 3 I Sambuca Puree | 2.84 I 4 I Beef Tenderloin | 2.52 | T 5 | Pork Chops 8.74 I 1.63 | I5.37 | –+ | orderid || menuid | qty I time_in -+ -+- 5 06:52:00T 4 06:54:00| 3 I 06:54:00 | 4 I 06:51:00 | 47 I 1 43 1 33 | 1 13 I 1 3 I 06:47:00 | 5 1 | -+ | id | empid | order date | time in | section | +– -+ 22 2010-11l-12 | 06:45:00 I 8 22 I 2010-1l-12 | 08:42:00 I 8 | 1| 2| I3I 22 I 2010-11-12 | 09:29:00 8 4 22 I 2010-1l-12 | 07:08:00 I 8 5 22I 2010-1l-12 | 10:37:00 I 8 Show transcribed image text Question 1 “What are our top selling items? Please show me the item name, item price, and number sold, but limit it to only just the top ten (10) and list them in order of number sold and item price.” (Hint: Google how to limit results returned.) Your results should match this exactly: I price | qty item name |Salted Butter | Pepper Pasta įStrawberry-Rhubarb Crisp | Bread with Compote Butter | Fruit Salad Deluxe with Fruit Sunset Appetizer | Lettuce Wraps Crackers with Cheese Nescafe Espresso iBar Peanuts 1.83 3743 1.63 3742 1.98 3739 6.66 3719 3.88 3718 3.34 3717 8.35 3717 3.30 3713 | 9.96 3675 2.75 3671 10 rows in set
Question 2 “Great! Include now how much were the total sales for these items?” Your results should match this exactly: | total sales l I price | gty item name Salted Butter | Pepper Pasta | Strawberry-Rhubarb Crisp | Bread wi th Compote Butter | Fruit Salad Deluxe with Fruit | | Sunset Appetizer Lettuce Wraps |Crackers with Cheese | Nescafe Espresso | Bar Peanuts 6849.69 I 1.83 3743 | 6099.46 I 1.63 3742 | 1.98 | 3739 | 6.66 3719 | 7403.22 | 24768.54 I 3.88 3718 | 3.34 3717 | 8.35| 3717 | 3.30 3713 | 9.96 | 3675 | 2.75| 3671 | 14425.84| 12414.78 31036.95 I 12252.90 | 36603.00 I 10095.25| + 10 rows in set
Question 3 “Hmm, our top seller is not the top total sales. Please show me the top ten sales in order of total sales amount.” Your results should match this exactly: I price | qty | total sales | | item name +– ——-+—– + | Nescafe Espresso Wine by the Glass Goat Cheese |Fancy Feast | Bread with Butter | Sugar Pie | Marjoram (Just Marjoram) I | Tiramisu Cheesecake | Lettuce Wraps | Orange Chicken | 9.96 | 3675 | 9.81 | 3579 | 9.81 3546 | 9.75 3540 | 9.36 3645 | | 9.29 | 3590 | 9.75 | 3409 | 8.47 3669 | 8.35 | 3717 | 9.16 | 3379 | 36603.00| 35109.99 I 34786.26| 34515.00 I 34117.20 | 33351.10| 33237.75| 31076.43| 31036.95 | 30951.64I —– 10 rows in set
Question 4 “Great! So Nescafe Espresso is our top seller. Can you show how many we sell each day of the week in the order of the quantity?” Your results should match this exactly: +- | day | gty + | Sun 779 735 Mon Tue 566 486 I 446 I 367 | 296 I Sat | Fri Thu | Wed +– +—–+ 7 rows in set
Question 5 “So how have our Sunday sales (total qty and total sales price) for Nescafe Espresso performed over the years?” Your results should match this exactly: + I year gty -+ I total sales | -+ | 2012 I | 2011 | | 2010 I | 2009 | | 2008 | | 2007 | 2006 I 2005 I | 2004 I | 2003 | 127 I 96 101 I 56 107 I 64 5 I 1264.92 956.16 1005.96 | 557.76 1065.72 | 637.44 49.80 69.72 | 1693.20 T 458.16 170 46 -+ 10 rows in set
–+ | id | item name | price | -+ I 1| Cheese Sticks 2 I Pepper Pasta 3 I Sambuca Puree | 2.84 I 4 I Beef Tenderloin | 2.52 | T 5 | Pork Chops 8.74 I 1.63 | I5.37 |
–+ | orderid || menuid | qty I time_in -+ -+- 5 06:52:00T 4 06:54:00| 3 I 06:54:00 | 4 I 06:51:00 | 47 I 1 43 1 33 | 1 13 I 1 3 I 06:47:00 | 5 1 |
-+ | id | empid | order date | time in | section | +– -+ 22 2010-11l-12 | 06:45:00 I 8 22 I 2010-1l-12 | 08:42:00 I 8 | 1| 2| I3I 22 I 2010-11-12 | 09:29:00 8 4 22 I 2010-1l-12 | 07:08:00 I 8 5 22I 2010-1l-12 | 10:37:00 I 8
Expert Answer
Answer to Need help with these SQL questions, please! Here are the column names for the tables: menu menu.id menu.item_name menu.p… . . .
OR

