不重复的select count(1) as total from tablename group by people having count(1) =1;重复的select count(1) as total from tablename group by people having count(1) >1;
我是這么一段時間內重復的寫的 大伙幫我看看 那里不對 select people from tablename where exists(select count(1) as total from tablename group by people having count(1)=1 and time between '$time1' and '$time2') 請大家幫幫忙亂 謝謝
select count(1) as total from tablename group by people having count(1) =1;
select count(1) as total from tablename group by people having count(1)>1;
select people from tablename group by people having count(1) = 1;
然后再找出重復的( count(1)>1)
有沒有更好的辦法?
大伙幫我看看 那里不對
select people from tablename where exists(select count(1) as total from tablename group by people having count(1)=1 and time between '$time1' and '$time2')
請大家幫幫忙亂 謝謝