Select * from table1 where y1 in (Select y1 from table1 group by y1 having count(*) > 1)