Re: Re: Untitled

From Wet Hummingbird, 11 Months ago, written in SQL, viewed 163 times. This paste is a reply to Re: Untitled from Tacky Iguana - view diff
URL http://codebin.org/view/97fa1aa1 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 tools_shop.events
  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
  10.  

Reply to "Re: Re: Untitled"

Here you can reply to the paste above