|
主题:[分享]sql标签实现投稿统计 [收藏主题] | 转到: |
支持(0) | 反对(0) 顶端 底部 |
以下是引用xiaoying2007在2008-12-28 12:38:00的发言:
select top 10 a.userid,a.username,totalNum from ks_user a,(select articleinput,count(*) as totalnum from ks_article where verific=1 group by articleinput)b where a.username=b.articleinput and Verific=1 order by b.totalnum desc
我上面这句是已审核文章的统计,不知道是否正确,请斑竹确认下 select top 10 a.userid,a.username,totalNum from ks_user a,(select articleinput,count(*) as totalnum from ks_article where verific=1 group by articleinput)b where a.username=b.articleinput order by b.totalnum desc |
|
支持(0) | 反对(0) 顶端 底部 |
<上一主题 | 下一主题 > |