1 100 NO 2 200 No 3 129.39 No 4 200 No 5 129.39 No 6 100 NO 7 200 No 8 129.39 No 9 100 NO 10 200 No 11 123 avg(close(1 to 10)/10) 12 234 avg(close(2 to 11)/10)has to display 13 231 avg(close(3 to 12)/10)has to display 14 . ... 15 . ...and so on 16 17 18 19 29
where ever i want to find the avg ,I have to take the 10 closes values beofore the curent value how can i write that query in Sql I dont know the logic in writing the query in Sql