瀏覽代碼

untested q1, not sure if it breaks the aggregation rules though

tarfeef101 6 年之前
父節點
當前提交
4e9b847608
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      a2/a2.sql

+ 7 - 0
a2/a2.sql

@@ -0,0 +1,7 @@
+select sname, snum from student where year = 2 and snum in
+(
+  select snum from mark where grade < 65 and deptcode in
+  (
+    select deptcode from department where deptname = "computer science"
+  ) having count(distinct section) > 1
+)