I am having trouble generating SQL code and was hoping
one of you guys would help.
The schema is:
student(sid, sname, sex, age, year, gpa)
course(cno, cname, sid)
section(dname, cno, sectno, pname)
enroll(sid, grade, dname, cno, sectno)
The queries i need generated are:
1) Print the age difference between the oldest and youngest Computer Sciences Major(s)
2) For each dept that has one or more major(s) with a gpa < 1.0, print the
name of the dept and the average gpa of it's majors.
3) Print the id's, names, and GPAs of the students who are currently taking
all of the Civil Engineering courses
4) Print the names of students who are taking both Computer Sciences course and
a Mathematical course.
5) print the name(s) abd sid(s) of the student(s) enrolled in the most classes
Thanks very much in advance