Re: Re: Untitled

From Wet Hummingbird, 2 Months ago, written in SQL, viewed 53 times. This paste is a reply to Re: Untitled from Tacky Iguana - view diff
URL Embed
Download Paste or View Raw
  1. WITH events_per_month AS (
  2. SELECT DATE_TRUNC('month', event_time) AS MONTH,
  3.        COUNT(*) AS events_count
  4. FROM
  5. WHERE event_name = 'view_item'
  6. GROUP BY DATE_TRUNC('month', event_time))
  7. SELECT *,
  8.        COUNT(events_count) OVER (ORDER BY MONTH)    
  9. FROM events_per_month

Reply to "Re: Re: Untitled"

Here you can reply to the paste above