使用派生一的一般形式如下: FROM (SELECT 列名1,列名2…… FROM 表* WHERE ...) AS 虚表*(列名1,列名2……)
C.
找出每个学生超过他自己选修课平均成绩的课程号,可用如下SQL实现: select sno, cno from sc, (select sno, avg(grade) from sc group by sno) as avg_sc(sno, grade) where sc.sno=avg_sc.sno and sc.grade>=avg_sc.agrade