소스 검색

in theory, q1 and q2 are done. in theory. i cannot stress that enough

tarfeef101 7 년 전
부모
커밋
db6cd6fe2c
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 10 1
      a2/a2.sql

+ 10 - 1
a2/a2.sql

@@ -4,4 +4,13 @@ select sname, snum from student where year = 2 and snum in
   (
     select deptcode from department where deptname = "computer science"
   ) having count(distinct section) > 1
-)
+)
+
+select pnum, pname from professor where deptcode not in
+(
+  select deptcode fromm department where deptname = "PM"
+) and pnum in
+(
+  select pnum from class where deptcode = "CS" and cnum = 245
+) having count(distinct term) = 1
+