Hi,
I have a table like this..
Type Amount ID Num ActId
Primary 256.32 12345 01 7899
None 125.21 12345 01 7900
None 456.87 12345 01 7901
Primary 1258.45 98745 04 7902
Primary 468.11 45565 06 7903
None 1258.45 45565 06 7904
None 200.00 85598 09 7905
I want to sum Amounts based on ID and Type. I DON'T want to use GROUP BY.. I want SUM (Amount) OVER (PARTITION BY ..
Result:
Type Amount ID Num
Primary 838.4 12345 01 -- Sum of First 3 rows
Primary 1258.45 98745 04 -- display 4th row directly becuase its primary
Primary 1726.56 45565 06 -- Sum of 5th and 6th rows
thanks