I am in a database class currently and am stuck on number 3 on this problem.
Problem 2 A university database has the following relations:
STUDENTS (Sno: int, Sname: varchar(64), Gender: ‘F’ or ‘M’, Age: int),
COURSES (Cno: int, Cname: varchar(32)),
ENROLLMENT (Sno: int, Cno:int, Grade: int).
Write SQL statements to perform the following tasks:
- Find the names of the youngest students.
- Find the Sno for students who enroll at least in courses with Cno = 1 and Cno = 3.
- Find the names of the students who enroll in all the courses.
- Find the names of the students who enroll more than 3 courses.
- Find the name and the average grade for each course.
- Find the names of students whose grades in the course “DBMS” is above the average grade.
3
4
5