Question: Write SQL query and its result based on the records added earlier for the following tasks: (one query per question) List number of food based

- Write SQL query and its result based on the records added earlier for the following tasks: (one query per question)
- List number of food based on food menu type
- List all food sold by each restaurant with food menu type Western (you may also use the available food menu type inserted earlier)
- List all customer details who lives in Kubang Kerian (you may also use the available customer address inserted earlier)
- Produce a Total-Purchase information by getting the overall total purchase for food menu type Thai (you may also use the available food menu type inserted earlier)
- Update expiry hour for all food sold by restaurant name "KAYUONE" (you may also use the available restaurant name inserted earlier) with additional 2 hours. You are required to show before and after update records.
- Display full customer name, food name, food type, food menu type, order date and order price for all order made on the last 30 days
- Display full detail of customer, total number of orders made and the overall total order amount made by the customer
- Modify the ORDERLIST table by adding in new column entry for additional request made by customer
REQUIREMENT A Food Delivery System allows customer to place food order online and will be delivered by the restaurant via dispatch services. The schema of the database is provided below: CUSTOMER CustID, CustName, CustAddress, CustPhone, CustEmail RESTAURANT RestID, RestName, RestAddress, RestPhone, RestEmail, RestPIC FOOD FoodID, FoodName, FoodType, Food Menutype, FoodExpiry Hour, FoodPrice, RestID ORDERLIST Order_ID, Order Date, OrderQty, Order Amount, FoodID, CustID [Primary key is underlined, foreign key is dotted underlined] Take note: Food type refers to the food main ingredient such as chicken. Food menu type refers to the style of cooking such as western. REQUIREMENT A Food Delivery System allows customer to place food order online and will be delivered by the restaurant via dispatch services. The schema of the database is provided below: CUSTOMER CustID, CustName, CustAddress, CustPhone, CustEmail RESTAURANT RestID, RestName, RestAddress, RestPhone, RestEmail, RestPIC FOOD FoodID, FoodName, FoodType, Food Menutype, FoodExpiry Hour, FoodPrice, RestID ORDERLIST Order_ID, Order Date, OrderQty, Order Amount, FoodID, CustID [Primary key is underlined, foreign key is dotted underlined] Take note: Food type refers to the food main ingredient such as chicken. Food menu type refers to the style of cooking such as western
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
