Exercise 5.3 The following relations keep track of airline flight information: Flights(flno: integer, from: string, to: string, distance: integer, departs: time, arrives: time, price: real)...

Give proper viewExercise 5.3 The following relations keep track of airline flight information:<br>Flights(flno: integer, from: string, to: string, distance: integer,<br>departs: time, arrives: time, price: real)<br>Aircraft(aid: integer, aname: string, cruisingrange: integer)<br>Certified(eid: integer, aid: integer)<br>Employees(eid: integer, ename: string, salary: integer)<br>Note that the Employees relation describes pilots and other kinds of employees as well;<br>every pilot is certified for some aircraft, and only pilots are certified to fly. Write each<br>of the following queries in SQL. (Additional queries using the same schema are listed<br>in the exercises for Chapter 4.)<br>1. Find the names of aircraft such that all pilots certified to operate them have<br>salaries more than $80,000.<br>2. For each pilot who is certified for more than three aircraft, find the eid and the<br>maximum cruisingrange of the aircraft for which she or he is certified.<br>3. Find the names of pilots whose salary is less than the price of the cheapest route<br>from Los Angeles to Honolulu.<br>4. For all aircraft with cruisingrange over 1000 miles, find the name of the aircraft<br>and the average salary of all pilots certified for this aircraft.<br>5. Find the names of pilots certified for some Boeing aircraft.<br>6. Find the aids of all aircraft that can be used on routes from Los Angeles to<br>Chicago.<br>7. Identify the routes that can be piloted by every pilot who makes more than<br>$100,000.<br>8. Print the enames of pilots who can operate planes with cruisingrange greater than<br>3000 miles but are not certified on any Boeing aircraft.<br>

Extracted text: Exercise 5.3 The following relations keep track of airline flight information: Flights(flno: integer, from: string, to: string, distance: integer, departs: time, arrives: time, price: real) Aircraft(aid: integer, aname: string, cruisingrange: integer) Certified(eid: integer, aid: integer) Employees(eid: integer, ename: string, salary: integer) Note that the Employees relation describes pilots and other kinds of employees as well; every pilot is certified for some aircraft, and only pilots are certified to fly. Write each of the following queries in SQL. (Additional queries using the same schema are listed in the exercises for Chapter 4.) 1. Find the names of aircraft such that all pilots certified to operate them have salaries more than $80,000. 2. For each pilot who is certified for more than three aircraft, find the eid and the maximum cruisingrange of the aircraft for which she or he is certified. 3. Find the names of pilots whose salary is less than the price of the cheapest route from Los Angeles to Honolulu. 4. For all aircraft with cruisingrange over 1000 miles, find the name of the aircraft and the average salary of all pilots certified for this aircraft. 5. Find the names of pilots certified for some Boeing aircraft. 6. Find the aids of all aircraft that can be used on routes from Los Angeles to Chicago. 7. Identify the routes that can be piloted by every pilot who makes more than $100,000. 8. Print the enames of pilots who can operate planes with cruisingrange greater than 3000 miles but are not certified on any Boeing aircraft.
Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here