用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正解