I hace many record of product database,and wanna count the moving average
value of sales_vol of last 3 days(id) of value, how to write sql command? 

id  Sales_vol      mov_avg
1     1             
2     2                 
3     3           =(1+2+3)/3
4     5           =(2+3+5)/3
5     4           =(3+5+4)/3
6     2           =(5+4+2)/3
7............
.......



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to