order by cont ->order by count(*)select count(*) as cont,ctt_id from tmp GROUP BY ctt_id order by count(*) desc limit 0,20
报什么错?把DISTINCT去掉看看