1.一个表中的Id有多个记录,把所有这个id的记录查出来,并显示共有多少条记录数。
-------------------------------------------------------------------------------
select id,count(*) from tab8 group by id having count(*)>1
select * from (select tab8,count(id) as num from tab8 group by id) t where t.num>1
2.用一条SQL语句 查询出每门课都大于80分的学生姓名
name kecheng fenshu
张三 语文 81
张三 数学 75
李四 语文 76
李四 数学 90
王五 语文 81
王五 数学 100
王五 英语 90
a): select distinct name from tab9 whe