Computer Science 455
Second Exercise Set
Due: Monday, Feb. 21. Please note that these problems are also
good review for Friday's exam.
Write SQL statements for the following queries (these come from
the third edition of Date's book):
- Get JNAME values for projects supplied by supplier
S1
- Get S# values for suppliers who supply both projects J1 and
J2
- Get S# values for suppliers who supply a London or Paris
project with a red part.
- Get J# values for projects supplied by at least one supplier
not in the same city.
- Get S#, SNAME values for suppliers supplying at least one part
supplied by at least one supplier who supplies at least one red
part.
- Get S# values for suppliers who supply the same part to all
projects.
- Get J# values for projects supplied with at least all parts
supplied by supplier S2.
- Get the total number of projects supplied by supplier S3
- Get the total quantity of part P1 supplied by supplier S1
- For each part being supplied to a project, get the part
number, the project number, and the corresponding total
quantity.
- This problem has been removed.
Place these in a file called <your first initial + your last
name>.sql (it is important that you use this name) in the class
handins folder on Plato (please don't do this until I send a note
saying that the first sql exercise has been picked up. The command
file should have the same format as your first SQL assignment.
Any questions? Please let me know. Many thanks!