mysql - How to query this situation? -


i wrote question few hours ago many many queries. mellamokb suggested:

how list categories, , how many posts in each category, sorted category posts category least.

how make query string? can't think start.

so... sort of thing looking for?

    select category.name          , count(*) [count]       post inner join postcategory on post.id = postcategory.post_id inner join category on postcategory.category_id = category.id   order count   group category.name 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -