Hi,
In my table I have three colums with the following data:
Market Amount AmountPercent
CT 705000 NULL
FAHT 1100000 NULL
LT 441000 NULL
STG 221100 NULL
I am trying to set the 'AmountPercent' column to the percentage of total amount sum.
I'm trying this:
But it just gives my percentage as 1.0000 for each line. I'm probably grouping wrong, but everything I try gives me a 1.0000 percentage.
Any ideas?
Thanks!
In my table I have three colums with the following data:
Market Amount AmountPercent
CT 705000 NULL
FAHT 1100000 NULL
LT 441000 NULL
STG 221100 NULL
I am trying to set the 'AmountPercent' column to the percentage of total amount sum.
I'm trying this:
Code:
select amount/sum(amount)from #temp
group by market, amount
But it just gives my percentage as 1.0000 for each line. I'm probably grouping wrong, but everything I try gives me a 1.0000 percentage.
Any ideas?
Thanks!