Any help on this query would be appreciates. The data looks like this
ID P1 P2 P3 YEAR 100100 500 100 100 2012 100100 300 200 300 2011 999999 300 200 300 2012 999999 500 100 100 2011
I would like to calculate the variance between the periods for each ID. ie. P2 in 2012 - P2 in 2011, etc. The final table should look like this...
ID P1 P2 P3 100100 200 -100 -200 999999 -200 100 200
thanks,
Brent