Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
wsilage
Yak Posting Veteran
82 Posts |
Posted - 2014-09-11 : 12:09:44
|
I did a Union query and I have this now in a table called T_AXA_Closed_ClaimType orderval CLaim Count chargesTotal Closed Claims 1 1202 2190994.520000Attempted Negotiations 2 842 1939784.720000Negotiated Deals 3 167 813549.960000I have this information into a Table now. I need to do a percentage from (Negotiated Deals/Attempted Negotiations). How can I do something like this in a query where the are in the same column? |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-09-11 : 12:27:24
|
[code]select max(case [type] when 'Attempted Negotiations' then charges end) / max(case [type] when 'Negotiated Deals' then charges end) as 'Negotiated Deals/Attempted Negotiations'from T_AXA_Closed_Claim[/code] |
|
|
|
|
|