SELECT
t1.num,
t1.estate_name AS ename,
t2.*
FROM
( SELECT TOP 100 PERCENT COUNT ( estate_name ) num, estate_name FROM crawler_property GROUP BY estate_name ) t1
LEFT OUTER JOIN crawler_property t2 ON t1.estate_name = t2.estate_name
ORDER BY
t1.num DESC,
t2.id DESC
sqlserver按照某个字段重复次数顺序查询全部数据
最新推荐文章于 2024-03-26 09:16:19 发布