Homework #3

Homework #3 - Scott Sommer Homework#3 Make-Up April 27th...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Scott Sommer Homework #3 Make-Up April 27 th , 2007 IST 210 Guoray Cai Exercise 5.1 1. Find the names of all Juniors (level = JR) who are enrolled in a class taught by I. Teach. SELECT DISTINCT S.Sname FROM Student S, Class C, Enrolled E, Faculty F WHERE S.snum = E.snum AND E.cname = C.name AND C.fid = F.fid AND F.fname = ‘I.Teach’ AND S.level = ‘JR’ 2. Find the age of the oldest student who is either a History major or enrolled in a course taught by I. Teach. SELECT MAX(S.age) FROM Student S WHERE (S.major = ‘History”) OR S.num IN (SELECT E.snum FROM Class C, Enrolled E, Faculty F WHERE E.cname = C.name AND C.fid = F.fid AND F.fname = ‘I.Teach’) 3. Find the names of all classes that either meet in room R128 or have five or more students enrolled. SELECT C.name FROM Class C WHERE C.room = ‘R128’ OR C.name IN (SELECT E.cname FROM Enrolled E GROUP BY E.cname HAVING Count (*) >= 5)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4. Find the names of all students who are enrolled in two classes that meet at the same time. SELECT DISTINCT S.sname
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Homework #3 - Scott Sommer Homework#3 Make-Up April 27th...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online