+-----------+-------+------+------+-------+
-- 找出每个学生超过自己选修课平均成绩的选课信息(先查出平均成绩,再查出选课信息)
-- 内层查询无法独立运行,所以是相关子查询
SELECT * FROM sc AS x WHERE grade >= (
SELECT AVG(grade) FROM sc AS y WHERE x.sno AND y.sno
)
+-----------+------+-------+
(北联网教程,专业提供视频软件下载)
……