1 WHEN TD_TIME_RANGE(at,"2009-01-01","2011-01-01","JST") THEN ELSE 3 END SELECT CASE WHEN TD_TIME_RANGE(at,NULL,"2009-01-01","JST") THEN 1 WHEN TD_TIME_RANGE(at,"2009-01-01","2011-01-01","JST") THEN ELSE 3 END, COUNT(*) FROM users GROUP BY CASE WHEN TD_TIME_RANGE(at,NULL,"2009-01-01","JST") THEN 1 WHEN TD_TIME_RANGE(at,"2009-01-01","2011-01-01","JST") THEN ELSE 3 END ձһొͨ͠Ϣʔβʔͷ͏ͪɺ2008·ͰΛʮୈҰϢʔβʔ܈ʯɺ2009͔Β 2010·ͰΛʮୈೋϢʔβʔ܈ʯɺͦΕҎ߱ΛʮୈࡾϢʔβʔ܈ʯͱߟ͑Δɻ ͦΕͧΕͷਓͲͷ͘Β͍͔ʁ ༻ྫ - CASEࣜ