SQL Oracle Combining Multiple Results Rows
- by Stuav
I have the below query
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
This spits out multiple rows of results that read "Android"....I would like there to be only 4 results rows, one for each case....so it comes out like this:
Device_Model Installs_Oct17_Oct30
Android 987
iOS - iPad 12003
iOS - iPhone 8563
iOS- iPod Touch 3482