HowardMarks
MIS
Hi Guys I wonder if you may be able to help.
I wish to select a group of CATEGORIES, and order them by the number of POSTS which they contain. This is to result in a list of 'most popular categories'.
So basically the SQL I need to use needs to be something like:
"SELECT * FROM CATEGORIES ORDER BY Count(SELECT * FROM POSTS WHERE POSTS.POST_CATEGORYID = CATEGORIES.CATEGORY_ID)"
But MS Access doesn't seem to like this use of Count().
Would any one have any ideas how to go about ordering the categories in this way?
Many thanks
Nick
Nick (Webmaster)
I wish to select a group of CATEGORIES, and order them by the number of POSTS which they contain. This is to result in a list of 'most popular categories'.
So basically the SQL I need to use needs to be something like:
"SELECT * FROM CATEGORIES ORDER BY Count(SELECT * FROM POSTS WHERE POSTS.POST_CATEGORYID = CATEGORIES.CATEGORY_ID)"
But MS Access doesn't seem to like this use of Count().
Would any one have any ideas how to go about ordering the categories in this way?
Many thanks
Nick
Nick (Webmaster)