Purchase Solution

Writing Queries Based on Schemas

Not what you're looking for?

Ask Custom Question

Consider the following database schema:

Product(maker, model, type)
PC(model, speed, ram, hd, price)
Laptop(model, speed, ram, hd, screen, price)
Printer(model, color, type, price)

Write the following queries based on above schema. Use a sub-query in each answer.

a) Find the model number of the item (PC, laptop, or printer) with the highest price.
b) Find the maker of the color printer with the lowest price.
c) Find the maker(s) of the PC(s) with the fastest processor among all those PCs that have the smallest amount of RAM.

Purchase this Solution

Solution Summary

This solution helps with a problem regarding writing queries based on schemas. It helps find the model number of the item, the maker of the color printer with the lowest price, and the maker of the PC with the fastest processor among all the PCs.

Solution Preview

Following are requested queries.

a) Find the model number of the item (PC, laptop, or printer) with the highest price.

SELECT TOP 1 p.price, p.model FROM
(
select model, price from Printer WHERE Printer.price = (SELECT ...

Purchase this Solution


Free BrainMass Quizzes
Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.