test.sql 443 B

12345678910
  1. -- run this to use test: db2 -tvmf test.sql
  2. select (select pname from professor where pnum = c.pnum), c.pnum, c.cnum, c.term, c.section,
  3. (select count(distinct snum) from mark where snum in
  4. (
  5. select snum from student where year between 3 and 4
  6. ) and deptcode = c.deptcode and cnum = c.cnum and term = c.term and section = c.section)
  7. from class c where pnum in
  8. (
  9. select pnum from professor where deptcode = 'PM'
  10. ) and term != 1185;