Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PostgreSQL Query help: List number of food based on food menu type Update expiry hour for all food sold by restaurant name KAYUONE (you may

image text in transcribed

PostgreSQL Query help:

  1. List number of food based on food menu type
  2. 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.
  3. 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
  4. Display full detail of customer, total number of orders made and the overall total order amount made by the customer
Customer Table Data Output Explain Messages Notifications custid custname custaddress [PK) integer character varying (255) character varying (255) 101 Lee Bukit Jalil 102 Raj Puchong 3 103 Ahmad Kubang Kerian 1 2 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 4 104 Siti Cheras 5 105 Charlie Kubang Kerian Restaurant Table Data Output Explain Messages Notifications restid restname restaddress [PK] integer character varying (255) character varying (255) 1 501 Kayuone Puchong 2 502 Uncle Dons Sri Petaling 3 503 ThaiExpress Bangsar 4 505 Devis TTDI 5 506 A&W Petaling Jaya restpic character varying (255) Kamal Richard 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 Siam Darma Edwin Food Table Data Output Explain Messages Notifications foodid foodname foodtype (PK) integer character varying (255) character varying (255) 1 1 901 Nasi Lemak Rice foodmenutype character varying (255) Local foodprice double precision restid integer foodexpiryhour integer 3.50 501 3 2 902 Tom Yam Soup Thai 10 503 5 3 Chicken Indian 15 505 4 903 Biryani 904 Spaghetti 4 Pasta Western 12 502 3 5 5 905 Pad Thai Noodles Thai 14.80 503 5 6 906 Dim Sum Dumplings Chinese 8 502 6 7 907 Burger Chicken Western 18.50 506 2 OrderList Table Data Output Explain Messages Notifications order_id orderdate orderaty orderamount (PK) integer date integer double precision 6010 2021-01-21 2 2 6011 2021-01-02 foodid integer custid integer 1 30 102 903 905 1 14.8 105 3 6012 2020-12-15 5 50 902 101 4 6013 2020-12-26 3 36 904 104 5 1 18.5 907 103 6014 2021-02-18 6015 2021-01-30 6 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_2

Step: 3

blur-text-image_3

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

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

How does inflation affect investment-center performance measures?

Answered: 1 week ago

Question

(1 point) Calculate 3 sin x cos x dx.

Answered: 1 week ago

Question

6. Vanguard

Answered: 1 week ago

Question

1. PricewaterhouseCoopers

Answered: 1 week ago