Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following database schema: Product(maker, model, type) PC(model, speed, ram, hd, rd, price) Laptop(model, speed, ram, hd, screen, price) Printer(model, color, type, price) (
Consider the following database schema:
Product(maker, model, type)
PC(model, speed, ram, hd, rd, price)
Laptop(model, speed, ram, hd, screen, price)
Printer(model, color, type, price)
- (Grouping and Aggregation) Write the following queries in SQL:
- Find the average speed of laptops costing over $2000.
- Find the average price of PCs and laptops made by manufacturer D.
- Find, for each manufacturer, the average screen size of its laptops.
- Find the manufacturers that make at least three different models of PC.
- Find, for each manufacturer who sells PCs, the maximum price of a PC.
- Find, for each speed of PC above 800, the average price.
- Find the average hard-disk size of a PC for all those manufacturers that make printers.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started