Write down the following queries in SQL for the database schema in Figure 1:
a) For each STUDENT whose MAJOR is 'CSE' and average of numeric GPA is greater than 3.5 and CLASS (classification) is 'senior', retrieve the student's NAME.
b) Retrieve the total number of students in the university whose major is 'CSE'.
c) For each student who has completed more than 60 credit hours, retrieve the student NAME and SSN, and the total number of sections that the student has completed, and the sum of the CREDITHOURS of the courses of these sections.
GRADES(SSN) REFERENCES STUDENT(SSN)
GRADES(CNO, SECNO, SEMESTER, YEAR) REFERENCES SECTION(CNO, SECNO, SEMESTER, YEAR)
SECTION(CNO) REFERENCES COURSE(CNO)
The attribute CLASS of STUDENT is the student classification ('freshman', 'sophomore', 'junior', 'senior', 'MS', 'PhD', etc.). The attribute NUMERIC_GRADE of GRADES is the numeric equivalent of the letter grade (4 for A, 3 for B, 2 for C, 1 for D, 0 for F, etc.).
STUDENT
NAME
CLASS
SSN
MAJOR
COURSE
CNO
DEPARTMENT
CNAME
LEVEL
CREDITHOURS
SECTION
CNO
SECNO
SEMESTER
YEAR
INSTRUCTOR
GRADES
CNO
SECNO
SEMESTER
YEAR
SSN
NUMERIC GRADE
Figure 1