Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PostgreSQL Query: Update expiry hour for all food sold by restaurant name KAYUONE (you may also use the available restaurant name inserted earlier) with additional

image text in transcribed

PostgreSQL Query:

  1. 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.
  2. 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
  3. Display full detail of customer, total number of orders made and the overall total order amount made by the customer
  4. Modify the ORDERLIST table by adding in new column entry for additional request made by customer
Data Output Explain Messages Notifications custid (PK) integer custname character varying (255) 101 Lee custaddress character varying (255) 1 Bukit Jalil 2 102 Raj 103 Ahmad Puchong Kubang Kerian custphone custemail numeric character varying (255) 173239595 lee@gmail.com 164947732 raj@gmail.com 160048761 ahmad@gmail.com 148760021 siti@gmail.com 129001876 charlie@gmail.com 3 4 104 Siti Cheras 5 105 Charlie Kubang Kerian Data Output Explain Messages Notifications restid (PK) integer restaddress character varying (255) restname character varying (255) 501 Kayuone 502 Uncle Dons restpic character varying (255) Kamal 1 Puchong 2 Richard Sri Petaling Bangsar restphone restemail numeric character varying (255) 3314591 kayuone@gmail.com 3571987 uncledons@gmail.com 3678125 thaiexpress@gmail.com 3164890 devis@gmail.com 3558791 anw@gmail.com 3 503 ThaiExpress Siam 4 505 Devis TTDI Darma 5 506 A&W Petaling Jaya Edwin foodprice double precision restid integer foodexpiryhour integer 501 3 foodmenutype character varying (255) Local Thai Indian Western 3.50 10 503 Data Output Explain Messages Notifications foodid foodname foodtype [ (PK) integer character varying (255) character varying (255) 1 901 Nasi Lemak Rice 2 902 Tom Yam Soup 3 903 Biryani Chicken 904 Spaghetti Pasta 5 905 Pad Thai Noodles 6 906 Dim Sum Dumplings 7 907 Burger Chicken 5 15 505 4 4 12 502 3 Thai 14.80 503 5 Chinese 8 502 6 Western 18.50 506 2 Data Output Explain Messages Notifications order_id orderdate orderqty orderamount (PK) integer date integer double precision 1 6010 2021-01-21 2 foodid integer custid integer 30 903 102 2 6011 2021-01-02 1 14.8 905 105 3 6012 2020-12-15 5 50 902 101 4 6013 2020-12-26 3 36 904 104 5 6014 2021-02-18 1 18.5 907 103 6 6015 2021-01-30 2 16 906 105

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+What is the nature of their impact?

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago