I want to calculate a Simple Moving Average within my loading script. A SQL based example would be something like:
select a.quote_date, a.close_price, AVG(b.close_price) [20_day_sma] from my_stock a join my_stock b on a.quote_date >= b.quote_date and b.quote_date >= DATEADD(dd,-20,a.quote_date) group by a.quote_date, a.close_price order by 1
Is there a way to do this self join technique in QlikView?