I want to write rolling 12 SQL query with following data , input will be FY and period no ie @FY=14, @P=3 my result should show rolling 12 months only from FY 14 3,2,1 months from year 13 - 12,11,10,9,8,7,6,5,4how to do this .group by Dept and objsub. please helpFY ObjSub Dept P_01 P_02 P_03 P_04 P_05 P_06 P_07 P_08 P_09 P_10 P_11 P_1213 12345 1 12 14 78 87 85 555 5 5 5 5 5 513 12349 54 55 4545 55 5 5 5 577 7 77 77 7777 11114 12345 1 555 55 5 55 555 555 88 88 9 8 1 814 12349 54 555 555 51 4 6 7444 477 788 88 221 3654 88
↧