|
主题:[分享]几条实用sql语句,商业区的! [收藏主题] | 转到: |
刚到商业区看到的,就发上来了,有用就拿去吧
销售排行,即按订单表里出现最多的记录,试试以下语句 select top 10 id,title,photourl from ks_product where id in(select top 10 proid from ks_orderitem group by proid)
select a.id,title from ks_article a,(select infoid,count(*) as num from ks_comment group by infoid)b where a.id=b.infoid order by b.num desc
|
|
支持(14) | 反对(14) 顶端 底部 |
<上一主题 | 下一主题 > |