0% found this document useful (0 votes)
46 views1 page

Practice 2 Database System Concepts. SQL

The document contains 7 SQL queries to be written using a University data set. The queries include: finding Comp Sci courses with 3 credits; IDs of students taught by instructor Einstein with no duplicates; highest instructor salary using aggregation; instructors earning highest salary; enrollment of sections in Spring 2009; maximum enrollment in Spring 2009; sections with maximum enrollment in Spring 2009.

Uploaded by

MiriamDíaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views1 page

Practice 2 Database System Concepts. SQL

The document contains 7 SQL queries to be written using a University data set. The queries include: finding Comp Sci courses with 3 credits; IDs of students taught by instructor Einstein with no duplicates; highest instructor salary using aggregation; instructors earning highest salary; enrollment of sections in Spring 2009; maximum enrollment in Spring 2009; sections with maximum enrollment in Spring 2009.

Uploaded by

MiriamDíaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Practice 2

Database system concepts.

SQL
Write the following queries in SQL, using the University data set.

http://kripken.github.io/sql.js/GUI/

1. Find the titles of courses in the Comp. Sci. department that have 3
credits.
2. Find the IDs of all students who were taught by an instructor named
Einstein; make sure there are no duplicates in the result.
3. Find the highest salary of any instructor. Use an aggregation operator
for this query.
4. Find all instructor earning the highest salary (there may be more than
one with the same salary).
5. Find the enrollment of each section that was offered in Spring
2009.
6. Find the maximum enrollment, across all sections, in Spring
2009.
7. Find the sections that had themaximum enrollment in Spring
2009.

You might also like