0% found this document useful (0 votes)
7 views6 pages

CS262 - DBMS Lab Assignment 2: Name: Renish R ID: 202252333

Uploaded by

Renish
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)
7 views6 pages

CS262 - DBMS Lab Assignment 2: Name: Renish R ID: 202252333

Uploaded by

Renish
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/ 6

CS262 – DBMS Lab

Assignment 2
Name: Renish R
ID: 202252333

Create the following tables:

1. Students Table:

2. Instructors Table:

3. Courses Table:
4. Grades Table:

5. Grade-Point Table:

Read the tables into an SQL database and write queries to compute the
following:

1. Course name(s) with highest enrolment: (course name, number of students


enrolled)
2. Show the total number of students who are enrolled in multiple courses.

3. Student(s) with maximum number of distinct grades across courses: (student


name, number of distinct grades).

4. Instructor name for the students enrolled in different courses. (Hint: Use join
operator).

(for my data input there is no case where an instructor teaches multiple courses. So, I got empty
Output.)

5. Students who are having the same CPI.

(In my data input, there is no students having same CPI, so the output is empty.)
6. Most generous teacher(s) – highest mean GPA in course: (teacher name,
course name).

7. Student(s) with overall highest GPA: (student name, GPA).

8. Student(s) with highest GPA in each house: (student name, GPA).

(Houses were not included in Database, so I have assumed all the students fall under the
same house.)
9. Show the name of students who are having FF grades.

(no students are having FF grade in the database.)

10.The students which are having name starting or ending alphabet is “A”.

(no students have name starting with ‘A’)

11.Show the number of students who are having grade either more than 70 or
are enrolled for the subject of Math.

(Instead of Math, course ‘202’ is considered).

12.Show the use of AGGREGATE function.


(taken AVG CPI as an example. AVG() is an aggregate function.)
13.Show the list of top 5 students based on their 4 semester marks.

14.Change datatype of marks.

15.Check how many students are having the middle name starting with “AB”.

(no students have middle name starting with ‘AB’).

You might also like