(5) select * (1) from table2 t1 (2) left join table2 as t2 on t1.t2id=t2.id (3) where tj (4) group by t1.type having count(*)>type (6) order by type desc (7) limit 1,2