write SQL query that returns average price per product

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

write SQL query that returns average price per product

Supplier
sid
address
city
New York
San Francisco
sname
status
Acme Widget Suppliers
1 Grub St.
660, Market Street
4, My Way
99999 Short Pier
21
20
32
Best Wines
90
Big Red Tool and Die
Spirits Co. Parts
The Wine Depot
Chicago
Las Vegas
Chicago
Miami
37
95
52
Null
68
2 Groom Lake
10
69
Alien Inc.
4, Collins Avenue
92
Product
pid
color
aquantity
100
pname
0119| Left Handed Bacon Stretcher Cover
Chateau Haut Brion, 2008
Acme Widget Washer
Acme Widget Washer
I Brake for Crop Circles Sticker
Anti-Gravity Turbine Generator
Anti-Gravity Turbine Generator
Fire Hydrant Cap
7 Segment Display
Red
0154
Black
120
0178
Red
10
0199
Silver
12
0212
Translucent
120
Cyan
Magenta
Red
0300
10
0494
13
0632
90
0763
Green
45
Supplies
price | dperiod
0.50
sid
pid
37
0178
37
0185
0.50
3
37
0468
11.70
1
37
0795
0.55
3
21
0289
17.95
1
21
0327
56.00
21
0178 NULL
NULL
21
0119
15.99
1
37
0178
16.99
4
68
0178
17.99
69
0178
16.99
4
94
0178
18.00
6.
Transcribed Image Text:Supplier sid address city New York San Francisco sname status Acme Widget Suppliers 1 Grub St. 660, Market Street 4, My Way 99999 Short Pier 21 20 32 Best Wines 90 Big Red Tool and Die Spirits Co. Parts The Wine Depot Chicago Las Vegas Chicago Miami 37 95 52 Null 68 2 Groom Lake 10 69 Alien Inc. 4, Collins Avenue 92 Product pid color aquantity 100 pname 0119| Left Handed Bacon Stretcher Cover Chateau Haut Brion, 2008 Acme Widget Washer Acme Widget Washer I Brake for Crop Circles Sticker Anti-Gravity Turbine Generator Anti-Gravity Turbine Generator Fire Hydrant Cap 7 Segment Display Red 0154 Black 120 0178 Red 10 0199 Silver 12 0212 Translucent 120 Cyan Magenta Red 0300 10 0494 13 0632 90 0763 Green 45 Supplies price | dperiod 0.50 sid pid 37 0178 37 0185 0.50 3 37 0468 11.70 1 37 0795 0.55 3 21 0289 17.95 1 21 0327 56.00 21 0178 NULL NULL 21 0119 15.99 1 37 0178 16.99 4 68 0178 17.99 69 0178 16.99 4 94 0178 18.00 6.
Purchase_Order
pdate
1511 | 2020-03-25
sid
37
ponr
1512
2020-04-10
94
1513
2020-04-11
37
1514
2020-04-12
32
1523 2020-04-19
37
1577
2020-05-15 37
1594 2020-06-25
37
РO_Line
ponr pid quantity
1511 | 0212
1511 0345
4
Transcribed Image Text:Purchase_Order pdate 1511 | 2020-03-25 sid 37 ponr 1512 2020-04-10 94 1513 2020-04-11 37 1514 2020-04-12 32 1523 2020-04-19 37 1577 2020-05-15 37 1594 2020-06-25 37 РO_Line ponr pid quantity 1511 | 0212 1511 0345 4
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education