查询结果按重复出现值的次数排序的MySQL语句
时间:2007-05-11 来源:linxh
4 下
select dp_id,count(dp_id) as d from user group by dp_id order by d desc;
5 下可以使用
select dp_id from user group by dp_id order by count(dp_id) desc;
相关阅读 更多 +