1. 用sql語句查詢同一天同一人出現次數超過2次的人名
select name,date,count(*) count from users group by date,name having count(*)=max(count)
2. 查詢與某一個人同省份的所有學生的信息的sql語句
select * from 表 where [表內省份欄位] = (select [表內省份欄位] from 表 where [表中姓名欄位] ='[某一個人]')
或者:
select * from 表 as tba where EXISTS(select 1 from 表 where [表中姓名欄位] ='[某一個人]' and [表內省份欄位]=tba. [表內省份欄位])