select aa,count(*) from tab group by aa having count(*)>=2
select * from tab awhere exists(select 1 from tab b where a.主键<>b.主键 and a.aa=b.aa)
select * from tab where aa in( select aa from tab group by aa having count(1)>1)