Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PostgreSQL query: List number of food based on food menu type. List all food sold by each restaurant with food menu type Western (you may

image text in transcribed

PostgreSQL query:

  1. List number of food based on food menu type.
  2. List all food sold by each restaurant with food menu type Western (you may also use the available food menu type inserted earlier).
  3. List all customer details who lives in Kubang Kerian (you may also use the available customer address inserted earlier.
  4. 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).
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

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago