sql统计排行同一列记录

要使objectId数量最多的排在最前面

select objectId,count(*as statisticNum from statistic group by objectId order by statisticNum desc 

查询结果

sql统计排行同一列记录

详细用法可以参加冯岩的博客http://www.cnblogs.com/eflylab/archive/2007/07/12/815295.html

w3Shool:http://www.w3school.com.cn/sql/sql_groupby.asp

相关文章:

  • 2021-07-14
  • 2021-06-18
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
  • 2021-04-10
  • 2022-12-23
  • 2021-07-24
猜你喜欢
  • 2022-02-11
  • 2021-11-05
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
相关资源
相似解决方案