Link to home
Start Free TrialLog in
Avatar of Tay Johnson
Tay Johnson

asked on

Is there a way to create code for cumulative variance using sql and not excel spreadsheets?

Is there a way to create sql code for cumulative variance?

col1 | cum var
21                  21      =21+0
-34                  -13    =21+(-34)
45                   32     =  -13+45
56                   88     = 32 + 56
-78                  10     = 88 + (-78)
Avatar of Nitin Sontakke
Nitin Sontakke
Flag of India image

Yes, I believe, however, you should also have a column (or set of columns) to order these rows.
ASKER CERTIFIED SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tay Johnson
Tay Johnson

ASKER

Thanks for the solution and a link to create my own sample code. Awesome
Thanks for the quick closure, cheers. Paul.