开发者

counting sub rows in mysql

开发者 https://www.devze.com 2022-12-24 03:10 出处:网络
i have 2 table ok catgories and artilces i have this structure catgories web > design > photoshop > layers

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

精彩评论

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