用sql语句查询同一天同一人出现次数超过2次的人名

2024-10-31 05:36:10
推荐回答(3个)
回答1:

select name,date,count(*) count from users group by date,name having count(*)=max(count)

回答2:

select name,date
from users
group by date,name
having count(*) >= all(select count(*) from users group by date,name)

回答3:

csuxp2008正解