[摘要]+--------+---------+
2 rows in set (0.00 sec)例二:各班级教师年龄及其班级及格人数(60为及格线)mysql> select age,-> (...
+--------+---------+
2 rows in set (0.00 sec)
例二:各班级教师年龄及其班级及格人数(60为及格线)
mysql> select age,
-> (select count(*) from tb_student as s where s.class = t.class && s.score >= 60 group by class)
-> as Count from tb_teacher as t order by Count desc;
+------+-------+
(北联网教程,专业提供视频软件下载)