查询某个数据库表属性 name 相同内容出现出现的次数,并按次数从大到小排序 SELECT name, COUNT(*) AS count FROM your_table GROUP BY name ORDER BY count DESC; 示例 select project_id, COUNT(*) AS count from app_ads_positions group by project_id order by count DESC; 运行结果: