Answered step by step
Verified Expert Solution
Link Copied!

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)

  1. (Grouping and Aggregation) Write the following queries in SQL:
  1. Find the average speed of laptops costing over $2000.
  2. Find the average price of PCs and laptops made by manufacturer D.
  3. Find, for each manufacturer, the average screen size of its laptops.
  4. Find the manufacturers that make at least three different models of PC.
  5. Find, for each manufacturer who sells PCs, the maximum price of a PC.
  6. Find, for each speed of PC above 800, the average price.
  7. 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

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

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions

Question

Which of the following is not a property of a B - tree?

Answered: 1 week ago

Question

Have issues been prioritized?

Answered: 1 week ago

Question

Has the priority order been provided by someone else?

Answered: 1 week ago

Question

Compare the current team to the ideal team.

Answered: 1 week ago