a2.sql 464 B

12345678910111213141516
  1. select sname, snum from student where year = 2 and snum in
  2. (
  3. select snum from mark where grade < 65 and deptcode in
  4. (
  5. select deptcode from department where deptname = "computer science"
  6. ) having count(distinct section) > 1
  7. )
  8. select pnum, pname from professor where deptcode not in
  9. (
  10. select deptcode fromm department where deptname = "PM"
  11. ) and pnum in
  12. (
  13. select pnum from class where deptcode = "CS" and cnum = 245
  14. ) having count(distinct term) = 1