说清楚一些,
select X from (select X,count(*) num from A group by colname)
where num>1;