SELECT * FROM table a LEFT JOIN (SELECT key,count(*) as c FROM table GROUP BY key ) b on a.key=b.key ORDER BY c desc
转载于:https://www.cnblogs.com/CaptainLin/p/4205839.html
SELECT * FROM table a LEFT JOIN (SELECT key,count(*) as c FROM table GROUP BY key ) b on a.key=b.key ORDER BY c desc
转载于:https://www.cnblogs.com/CaptainLin/p/4205839.html