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
精彩评论