This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: WHERE l.cid=c.cid AND (l.year=2000 OR l.year=1999); Answer: Find the names of courses that are taught in 2001 but not taught in 2000 or 1999. name ( year = 2001 (lecturing courses)) - name ( (year = 1999 year = 2000) (lecturing course)) (3). SELECT c.name FROM lecturing l1, lecturing l2, courses c WHERE l1.cid=l2.cid AND l1.cid=c.cid AND l1.sid=l2.sid AND l1.year=1999 AND l2.year=2000; Answer: Find the names of the courses that are taught by the same staff in both 1999 and 2000 name ( year = 1999 year2 = 2000 (lecturing courses year -> year2 lecturing) (4). SELECT s.lastname FROM staff s WHERE s.sid NOT IN (SELECT l.sid FROM lecturing l); Answer: Find the last names of the staff that do not teach lastname (( sid staff - sid lecturing) staff)...
View Full Document
- Fall '08