glass
pen
clip
papers
heaphones

• Describe how the following code will work:SELECT dt, region, revenue,  count(*) OVER (twdw) AS moving_count,  avg(revenue)…

• Describe how the following code will work:SELECT dt, region, revenue,  count(*) OVER (twdw) AS moving_count,  avg(revenue)…

• Describe how the following code will work:SELECT dt, region, revenue,   count(*) OVER (twdw) AS moving_count,   avg(revenue) OVER (twdw) AS moving_averageFROM moving_average_data madWINDOW twdw AS (PARTITION BY region   ORDER BY dt RANGE BETWEEN   ‘7 days’::interval PRECEDING AND   ‘0 days’::interval FOLLOWING)ORDER BY region, dt