0
在珍妮弗·威登的dbclass創建SQL,她給獲得一個大學的例子配對與他們申請的最高GPA。該SQL低於不使用分鐘
select college.cname, state, gpa
from college, apply, student
where college.cname = apply.cname
and apply.sid = student.sid
and gpa >= all (select gpa
from student,apply
where student.sid = apply.sid
and apply.cname = college.cname);
我想知道如何創建查詢發現與申請人
我知道這是可以做到如下
select college.cname, state, gpa
from college, apply, student
where college.cname = apply.cname
and apply.sid = student.sid
and gpa = (select min(gpa) from student);
但如何的最低 GPA配對學院我這樣做,沒有使用最小?
對於什麼數據庫? – 2013-03-22 03:27:32
由標準的SQL ..所以所有的數據庫應該表現相似 – damon 2013-03-22 03:29:02
除了他們不這樣做 - ANSI存在這個原因。 – 2013-03-22 03:29:51