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
mysql 按出现次数排序
2022-01-17 00:46:15
2022-01-17 00:46:15
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