Created
May 28, 2015 16:44
-
-
Save alexbaldwin/81fe0407368f9e6204aa to your computer and use it in GitHub Desktop.
Dataclip for New Users Monthly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH monthrollup as ( | |
select count(*) as signups, | |
date_trunc('month', created_at) as date | |
from users | |
WHERE created_at >= current_date - interval '24 months' | |
group by 2 | |
) | |
SELECT date, | |
signups | |
FROM monthrollup | |
WINDOW w as (order by date) | |
ORDER BY date ASC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment