This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: SQL: Queries, Constraints, Triggers 49 9. Find the sid s of suppliers who supply a red part or a green part. 10. For every supplier that only supplies green parts, print the name of the supplier and the total number of parts that she supplies. 11. For every supplier that supplies a green part and a red part, print the name and price of the most expensive part that she supplies. Answer 5.2 Answer omitted. Exercise 5.3 The following relations keep track of airline ﬂight information: Flights( ﬂno: 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 ﬂy. 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 have1....
View Full Document
This note was uploaded on 01/17/2012 for the course EGN 4302 taught by Professor Dr.vishak during the Fall '12 term at University of Central Florida.
- Fall '12