Search for question
Question

2. Write the following queries in SQL, using the university schema (https://codex.cs.yale.edu/avi/db-book/university-lab-dir/sample_tables-dir/DDL.sql) and execute your SQL statement on the sample database with small relations (https://codex.cs.yale.edu/avi/db-book/university-lab-dir/sample_tables-/ndir/smallRelations/smallRelations InsertFile.sql) and show me both the

SQL statements and the query results a. Find the names of all students who have taken at least two courses offered by Comp. Sci. department; make sure there are no duplicate names in the result. Note that student in other departments can take courses from Comp. Sci. as well. b. Find the IDs and names of all students who have not taken any course offering in 2009. c. For each department, find the name and salary of the instructor who earns the minimum salary in that department. You may assume that every department has at least one instructor. d. Find the highest, across all departments, of the per-department minimum salary computed by the preceding query (part 7.c). e. Find the course titles of all prerequisite courses of "CS-319".

Fig: 1

Fig: 2