我有以下查询
Select
case upper(device_model)
when 'IPHONE' then 'iOS - iPhone'
when 'IPAD' then 'iOS - iPad'
when 'IPOD TOUCH' then 'iOS - iPod Touch'
Else 'Android'
End As Device_Model,
count(create_dtime) as Installs_Oct17_Oct30
From Player
Where Create_Dtime >= To_Date('2012-Oct-17','yyyy-mon-dd')
And Create_Dtime <= To_Date('2012-Oct-30','yyyy-mon-dd')
Group By Device_Model
Order By Device_Model
这会吐出多行显示为“Android”的结果....我希望只有 4 个结果行,每个案例一个....所以结果如下:
Device_Model Installs_Oct17_Oct30
Android 987
iOS - iPad 12003
iOS - iPhone 8563
iOS- iPod Touch 3482