'SELECT product, COUNT(product) FROM table GROUP BY product' will do this, I
believe.

Joshua Thomas
Network Operations Engineer
PowerOne Media, Inc.
tel: 518-687-6143
[EMAIL PROTECTED] 

---
In theory there is no difference between theory and practice. In practice
there is. 
- Yogi Berra 
---



> -----Original Message-----
> From: Pawel Filutowski [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 15, 2003 7:49 AM
> To: [EMAIL PROTECTED]
> Subject: Haw to get specific result?
> 
> 
> Hello,
> 
> I have table like this:
> 
> id | product
> ------------
> 0 | switch
> 1 | switch
> 2 | hub
> 3 | hub
> 4 | hub 
> 5 | wire
> 6 | wire
> 7 | wire
> 8 | wire
> 9 | wire
> .
> .
> I`m looking for query which give me result as array:
> 0 - > count of 'switch'
> 1 - > count of 'hub'
> 2 - > count of 'wire'
> 
> Haw to do it ??
> 
> Regards,  Paul
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to