select site,
case
when site='AppCircle' then (count(create_dtime)*0.4438083264)
when site='AppCircle Clips' then (count(create_dtime)*0.0096978792)
when site='BC : SponsorPay' then (count(create_dtime)*0.9620989399)
when site='BonusCoins.com : Aarki' then (count(create_dtime)*0.4612565445)
when site='Nielsen Rewards' then (count(create_dtime)*-0.6000000000)
when site ='Portal : Paymentwall' then (count(create_dtime)*0.5433541667)
when site ='Portal : RadiumOne' then (count(create_dtime)*0.0619798753)
when site ='Portal : TrialPay' then (count(create_dtime)*2.1468159204)
when site ='bonuscp_login' then (count(create_dtime)*-0.1500000000)
when site ='facebook_like' then (count(create_dtime)*2.1468159204)
when site ='iTunes' then (count(create_dtime)*-0.0300000000)
end
From player_aux_pt
Where
Trunc(Create_Dtime) >= To_Date('2012-Nov-01','yyyy-mon-dd')
And Trunc(Create_Dtime) <= To_Date('2012-Nov-30','yyyy-mon-dd')
group by site
これにより、2列のデータが生成されます
Site [insert every case statement here]
情報の2番目の列に「Profit」という名前を付けたいだけです
Site Profit
私は行き詰まっている多くの異なる方法を試しました。