Download presentation
Presentation is loading. Please wait.
Published byLesley Gaines Modified over 9 years ago
1
The Student Registry Database Ian Van Houdt and Muna alfahad
2
Queries
3
Exercise.. List the elective courses o Use “Except”
4
Exercise.. List the departments that do not have any courses yet o Try to list the department name and name this attribute “department” + college name and name it “college” o Try to use “join” and “IN predicate”
5
Exercise.. Show majors (name) and the courses (code + name) each major offers. Sort by major name
6
Exercise.. List all courses and their prerequisites if any o Use “LEFT Join” o Sorted by course id
7
Exercise.. List maximum, minimum and average salaries of the instructors in each department (name) o Sorted by the department name
8
Exercise.. Show students who have more than one major o Student id, first_name, middle_name, last_name, and the number of majors as “no. of majors”
9
Exercise.. Show CS and MATH courses in Fall 2014 o Course code, building number, room number, day and time o CS department id is 13 & Math department id is 8
10
Exercise.. Americans instructors whose salaries are greater than the maximum salary of German instructors o Instructor id, first_name, middle_name, last_name, job_title and salary o Use subquery
11
Exercise.. Show the elective courses that offered by each major o Course id, course code, course name, and major name o Try to use “IN or NOT IN predicate”
12
Exercise.. Show the Canadian student with the best GPA o Student id, first name, last name o Try to use Subquery in Where clause, and the ALL predicate
13
Exercise.. List all Computer Science exchange students o Student id, first name, last name, nationality
14
Exercise.. Find CS student with the highest GPA o Id, first and last name o Try using a subquery in the Where clause
15
Exercise.. Find terms and years that CS 202 has been offered
16
Exercise.. List the nationality and the number of students from that country that are CS majors Order by most to least
17
Exercise.. List the id, first and last name of the highest performing CS student (GPA)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.