开发者

counting sub rows in mysql

i have 2 table ok catgories and artilces i have this structure catgories

web > design > photoshop > layers
web > design > photoshop > effects

and each one is a catgory and layers catgories has 100 article and e开发者_JAVA百科ffects catgories has 50 article

now i want when count the articles 'web' catgory it show 150 article how i can do this give me an example


select category,count(*)
group by category
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜