Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Postgres Questions regarding the tables above. Thank you in advance! E5.1.17 Display the RegionID, RegionName, and the total amount of sales (in dollars) in the

image text in transcribed

Postgres Questions regarding the tables above. Thank you in advance!

"E5.1.17 Display the RegionID, RegionName, and the total amount of sales (in dollars) in the region for all regions. Display the total amount of sales as AmountSpent."

"E5.1.18 Display the TID and the total number of items (of all products) sold within the transaction for all sales transactions whose total number of items (of all products) sold within the transaction is greater than five."

"E5.1.19 For each vendor whose product sales exceed $700, display the VendorID, VendorName, and total amount of sales in dollars. Display the total amount of sales as TotalSales."

"E5.1.20 Display the ProductID, ProductName, and ProductPrice of the cheapest product."

"E5.1.21 Display the ProductID, ProductName, and VendorName for products whose price is below the average price of all products."

"E5.1.22 Display the ProductID and ProductName of the product for the products whose total quantity sold in all transactions is greater than 2. Sort the results by ProductID."

REGION INCLUDES VENDOR RegionID ProductID TID Quantity VendorID VendorName Region Name Chicagoland Tristate 1X1 T111 1 PG Pacifica Gear T 2x2 T222 1 MK Mountain King 3X3 T333 5 STORE 1X1 T333 1 CATEGORY CategoryID StoreID Store Zip RegionID 4X4 T444 1 S1 60600 2X2 T444 2 CP CategoryName Camping Footwear S2 60605 4X4 T555 4 FW S3 35400 T 5X5 T555 2 6X6 T555 1 SALES TRANSACTION TID CustomerID TDate CUSTOMER StoreID S1 T111 1-2-333 CustomerID CustomerName Customer Zip 1-Jan-2020 1-Jan-2020 T222 2-3-444 S2 1-2-333 Tina 60137 T333 1-2-333 S3 2-Jan-2020 2-3-444 Tony 60611 T444 4-5-666 S3 3-4-555 Pam 35401 2-Jan-2020 2-Jan-2020 T555 2-3-444 S3 PRODUCT ProductID ProductName ProductPrice VendorID CategoryID CP 1X1 Zzz Bag $100 PG 2X2 $70 MK FW Easy Boot Cosy Sock 3X3 $15 MK FW 4X4 Dura Boot $90 PG FW 5X5 $ 150 MK CP Tiny Tent Biggy Tent 6X6 $250 MK CP Figure 5.1c Records in the ZAGI Retail Company Sales Department Database

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions

Question

Discuss human resources as a strategic resource.

Answered: 1 week ago

Question

What has made the Google search engine so successful?

Answered: 1 week ago