2014-01-29 CASE文 select date(created_at) date, case type when 0 then 'hight' when 1 then 'normal' when 2 then 'low' else 'etc' end, count(*) from hogehoge_log group by type,date;