2015-05-19 164 views

回答

2

試試這個:

SELECT IF(`fruit` = 'mango', `fruit`, 'other') AS `someName`, count(*) as `total` 
FROM mytable 
GROUP BY `someName`; 

Fiddle