I am looking for a query that can aggregate data on a 21 days back basis in the following way: my table has the following columns: accountid, date, measure
I need, for each account, date to sum(measure) for the previous 21 days back. Any idea how to do it in pure SQL without window/analytic function ? (I'm writing SQL inside a BI product which does not have support in analytic functions)