Purchase Solution

SQL queries

Not what you're looking for?

Ask Custom Question

Consider the 3 tables with these attributes:

TABLE MECHANIC
(
LAST_NAME VARCHAR(50),
BIRTHDATE DATETIME,
PHONE_NO CHAR(10)
)

TABLE AIRPLANE
(
SERIAL_NO CHAR(12),
MODEL VARCHAR(40),
CAPACITY INT
)

TABLE WORKS_ON
(
MECHANIC_LAST_NAME VARCHAR(50),
MECHANIC_BIRTHDATE DATETIME,
AIRPLANE_SERIAL_NO CHAR(12),
CONTRACT_AMOUNT MONEY
)

Write SQL queries to answer the following questions:

(a) Find the last names, birth dates, and phone numbers of all mechanics who have earned at least $50000 from contracts on Boeing 747 airplanes.

(b) Find the average amount of money that it has taken to do maintenance on each different model of jumbo jet (defined to be any airplane model whose capacity is at least 150).

(c) Double the capacity of each DC-10 airplane.

(d) Add to the database, for each DC-9 model airplane,
a DC-10 model airplane with a capacity 50 greater than that of the DC-9 and a serial number
the same as that of the DC-9 except with an extra leading "1".

Purchase this Solution

Solution Summary

SQL queries that answer specified requirements such as finding the last names, birth dates, and phone numbers of all mechanics who have earned at least $50000 from contracts on Boeing 747 airplanes. Find the average amount of money that it has taken to do maintenance on each different model of jumbo jet.

Solution Preview

Please find the required SQL queries below.

(a)
SELECT WORKS_ON.MECHANIC_LAST_NAME, WORKS_ON.MECHANIC_BIRTHDATE, MECHANIC.PHONE_NO
FROM WORKS_ON, AIRPLANE, MECHANIC
WHERE WORKS_ON.CONTRACT_AMOUNT > 50000
AND ...

Purchase this Solution


Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

Excel Introductory Quiz

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

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

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.