Question: There is no table data to test the queries. Q5 SQL 30 Points This question is based on the following set of tables modeling the

 There is no table data to test the queries. Q5 SQL

There is no table data to test the queries.

Q5 SQL 30 Points This question is based on the following set of tables modeling the operations of a restaurant Menu (Item-ld, Price, Description) Ingredient (Item-ld, Food-Id, Quantity) Food (Food-Id,Description. Category,Amount-remaining) Order (Order-ld,Item-ld, Number-ordered) The ingredient table shows which foods are in the menu items. For example, the menu item for "French fries" might correspond to the food-ids of potato, oil and salt. The category of a Food could be vegetable, meat, dairy, etc. Quantity and Amount- remaining are measured in grams. Every order in the restaurant has a unique Order-ld which is associated with all of the ordered items, in the Order table. Q5.1 6 Points Write SQL statements to create a view Vegetarian-Menu that includes only items from the menu that do not contain meat. The columns should be the same as those of Menu. Q5.2 6 Points Explain in plain English the meaning of the following SQL query: SELECT Food.Food-id, count(Item-id) FROM Food LEFT OUTER JOIN Ingredient ON Food.Food-id=Ingredient.Food-id Group BY Food.Food-id Hint: The count of a column containing just null values is zero. Q5.3 6 Points Suppose that I placed an order with order number 1234. Write an SQL query to list each Food-id in my order's items, along with the total quantity of that Food-id. Present the results so that the foods are listed in descending order of total quantity. Note that a Food-id may be an ingredient of multiple items from an order

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!