通常group还可和having连用。
比如:查询1门课以上不及格的学生,则按学号(sn0)分类有:
select sn0,count(*) from grades
where mark<60
group by sno
having count(*)>1
posted on 2010-06-10 18:14 永不言弃program 阅读(280) 评论(0) 编辑 收藏 举报
比如:查询1门课以上不及格的学生,则按学号(sn0)分类有:
select sn0,count(*) from grades
where mark<60
group by sno
having count(*)>1
posted on 2010-06-10 18:14 永不言弃program 阅读(280) 评论(0) 编辑 收藏 举报