| Field | Type | Null | Key | Default | Extra | +------------------+------------------------------------------------------------------+------+-----+---------+----------------+ | id | int(10) | | PRI | NULL | auto_increment | | status | enum('received','send','cancelled') | YES | | NULL | | | notes | longblob | YES | | NULL | | | date | datetime | YES | | NULL | | +------------------+------------------------------------------------------------------+------+-----+---------+----------------+
I have table account (see below). I need to get count of received, count of send and cound of cancelled records. I know that I can do this in 3 queries. #1. select count(*) from account where status='received'; #2. select count(*) from account where status='send'; #3. select count(*) from account where status='cancelled'; Is it possible to get count of each status in one query instead of 3? TH -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]