MYSQL有一个select问题不知道有人会写不? 求表中学生同名同姓名单,并统计同名人数

表名 student
其中有两个字段 sid 和 sname

select sname, count(sid)
from student
group by sname having count(sid)>1;

select sname, count(1) from student group by sname;

select sname from (select sname, count(sname) as cnt from student group by sname having cnt > 1)

select sname, count(1)
from student
group by sname

select sname,count(*) from student group by sname;