0% found this document useful (0 votes)
19 views2 pages

05 6.queries Practice Set.3 University Schema Korth

The document outlines a series of questions related to a university database schema, focusing on instructors, courses, and student information. It includes queries for retrieving names, IDs, and salaries of instructors, as well as details about courses offered in specific semesters. Additionally, it addresses aggregate functions to analyze average salaries and counts within the database.

Uploaded by

dev.m.dodiya2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

05 6.queries Practice Set.3 University Schema Korth

The document outlines a series of questions related to a university database schema, focusing on instructors, courses, and student information. It includes queries for retrieving names, IDs, and salaries of instructors, as well as details about courses offered in specific semesters. Additionally, it addresses aggregate functions to analyze average salaries and counts within the database.

Uploaded by

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

University schema

Source: Database System Concepts, 6th ed, Avi Silberschatz, Henry F. Korth, S. Sudarshan,
Tata McGraw-Hill

Note: Test database is available as university schema in public database (10.100.71.21).

QUESTIONS:

1. Find the names of all instructors in history department?


2. Find thee instructor id and department name of all instructor associated with a
department with a budget of greater then $95000?
3. Find the names of all instructor in the computer science department who have salary
greater than $75000?
4. Find instructor name and course identifiers for instructors in computer science
department?
5. For all instructors in the university who have taught some course , find their names
and the course_id of all courses they “taught”?
6. List the names of instructors along with the titles of courses that they teach?
7. Find the names of all instructors whose salary is greater than atleast one instructor
in the biology department?
8. Find the set of all courses taught in the fall 2009 semester?
9. Find the set of all courses taught either in fall 2009or in spring 2010 or both?
10. Find all courses taught in the fall 2009 semester but not in the spring 2010
semester?
11. Find all courses that were offered atmost once in 2009?
12. Find the titles of courses in computer science department have 3 credits?
13. Find the ids of all students who were taught by an instructor name einstein ,make
sure that no duplicates in the reesult?
14. Find the names of all instructors in the physics department together with the
course_id of all courses they taught?
15. Find all student who have taken all courses offered in the biology department?

Questions on aggregate functions:

1. Find the average salary of instructors in the computer science department?


2. Find those department for which the average salary is greater than or equal to all
average salaries?
3. Find the highest salary of any instructor?
4. Find nimber of tuples in course relation?
5. Find the total number of instructors who teach a course in spring 2010 semester?
6. Find the average salary in each department?
7. Find the number of instructor in each department who teach a course in the spring
2010 semester?
8. Find the average total credits(tot_cred) of all students enrolled in the section ,if the
section had atleast 2 students?
9. Write a query to find total of all salary amounts?

You might also like