↧
Answer by Erwin Brandstetter for Return previous running total when value is...
One way is to generate one row per (customer_id, the_day)before running the window function. Like:SELECT c.customer_id, d.the_day , sum(t.tsla_amount) OVER w AS tsla_running_amount , sum(t.goog_amount)...
View ArticleReturn previous running total when value is null in a time series
This is a continuation of a previous question, where table definition and sample data can be found. (Huge thanks to @Erwin Brandstetter for the help there).All of this is being done on a PostgreSQL...
View Article