笔记:Sql数据统计
程序员文章站
2022-04-30 08:42:04
...
数据结构:
统计回复贴子数量:
select its.Id,its.UserId,its.Title,its.Content,its.AddTime,t.RecordCount from (select ParentId,Count(ParentId) RecordCount from ReplayStickers group by ParentId) as t left join InitiatedStickers its on t.ParentId=its.Id order by RecordCount desc
显示结果:
统计回复贴子数量:
select its.Id,its.UserId,its.Title,its.Content,its.AddTime,t.RecordCount from (select ParentId,Count(ParentId) RecordCount from ReplayStickers group by ParentId) as t left join InitiatedStickers its on t.ParentId=its.Id order by RecordCount desc
显示结果:
下一篇: Jenkins JFR Plugin
推荐阅读