Question: Write the following queries in SQL, using the university schema. (We suggest you actually run these queries on a database, using the sample data that
Write the following queries in SQL, using the university schema. (We suggest you actually run these queries on a database, using the sample data that we provide on the web site of the book, db book.com. Instructions for setting up a database, and loading sample data, are provided on the above web site.)
a. Find the titles of courses in the Comp. Sci. department that have 3 credits.
b. Find the IDs of all students who were taught by an instructor named Einstein; make sure there are no duplicates in the result.
c. Find the highest salary of any instructor.
d. Find all instructors earning the highest salary (there may be more than one with the same salary).
e. Find the enrollment of each section that was offered in Fall 2017.
f. Find the maximum enrollment, across all sections, in Fall 2017.
g. Find the sections that had the maximum enrollment in Fall 2017.
Step by Step Solution
3.40 Rating (172 Votes )
There are 3 Steps involved in it
a SELECT DISTINCT title FROM course WHERE deptname Comp Sci AND cre... View full answer
Get step-by-step solutions from verified subject matter experts
