SQLITE moving average
问题 Trying to get the moving average on a per X months basis using SQLite. Problem is i cannot seem to figure or find anything remotely useful on how to aggregate with a X month(s) lookback period and thus create a moving average. Table CREATE TABLE "nav" ( `id` TEXT, `nav` NUMERIC, `date` TEXT ); Sample data id nav date 1380 15.3 2005-01-09 1380 15.4 2005-01-16 1380 15.5 2005-01-23 1380 15.55 2005-01-30 1380 15.66 2005-02-06 1380 15.45 2005-02-13 1380 15.26 2005-02-20 1380 15.14 2005-02-27 1380