Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
June 25, 2005, 5:36 am
rate this thread
I have a `category` table with columns cat_id and cat_name. And another
`items` table with columns item_id, item_name and cat_id.
I want a query which will select display each category name and the
number of items in that category. I could do this in two sql
statements, is it possible to do it in one?
Re: Query help: Get category and number of items in one query
Look up GROUP_CONCAT in the MySQL reference documentation.
Also see this thread on this newsgroup from a couple of weeks back:
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum