Assignment 1 See due dates for each part below.
Solutions to Assignment1
Assignment 2, use car.mdb , to view the data click CarData,
Solutions to Assignment2
Create a folder SQLLEARN off the C: drive and download sql13.zip and unzip.exe into this folder. Download spj.mdb database for this assignment. In the SQLLEARN folder at the DOS prompt type: unzip sql13 then type: setup
SqlLearn was developed by our faculty member, Prof. Devi. To view/print the tables in spj.mdb database please click DataSpj.
To view/print the tables in spj.mdb database please click DataSpj.
Please note that key words, table names and column names are not case sensitive but data is i.e., City and city and CITY are the same column name but Paris' and 'PARIS' and 'paris' are not the same data.
Assignment locations & due dates: joins, aggregate, subqueries, exists, upgrade, miscellaneous
Simple Queries (Due 1st week )
Joins (Due 2nd week)
Aggregate Functions (Due 3rd week)
Special Data (Due 3rd week)
21. Get job names for jobs supplied by supplier S1.
22. Get colors for parts supplied by supplier S1.
23. Get part numbers for parts supplied to any job
in
24. Get job numbers for jobs using at least one part available from supplier S1.
25. Get supplier numbers for suppliers supplying at least one part supplied by at least one supplier who supplies at least one red part.
26. Get supplier numbers for suppliers with status lower than that of supplier S1.
27. Get job numbers for jobs whose city is first in the alphabetic list of such cities.
28. Get job numbers for jobs supplied with part P1 in an average quantity greater than the greatest quantity in which any part is supplied to project J1.
29. Get supplier numbers for suppliers supplying some job with part P1 in a quantity greater than the average shipment quantity of part P1 for that project.
30. Repeat Exercise 23 but use EXISTS in your solution.
31. Repeat Exercise 24 but use EXISTS in your solution.
32. Get job numbers for jobs not supplied with any
red part by any
33. Get job numbers for jobs supplied entirely by supplier S1.
34. Get part numbers for parts supplied to all jobs
in
35. Construct a list of all cities in which at least one supplier, part, or job is located.
36. Show the results of the following SELECT:
SELECT P.CPLOR
FROM P
SELECT P.COLOR
FROM P;
Upgrade Operations (Due 5th week)
37. Change the color of all red parts to orange.
38. Delete all projects for which there are no shipments.
39. Insert a new supplier (S10) into table S. The
name and city are Smith and
40. Construct a table containing a list of part
numbers for parts that are supplied either by a
41. Construct a table containing a list of job numbers
for jobs that are either located in
42. Get supplier names that have a letter 'e' somewhere in their name.
43. Get suppliers names which start the letters 'Bla'.
44. How many suppliers in
45. Delete all suppliers that never supplied a red part.