Created
April 30, 2014 01:52
-
-
Save pnorman/165041d0a63f944a5282 to your computer and use it in GitHub Desktop.
SQL to find active contributors as of 20140401
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
SELECT COUNT(*) | |
FROM ( | |
SELECT user_name, COUNT(*) AS months | |
FROM ( | |
SELECT DISTINCT user_name, date_trunc('month', created_at) as mon | |
FROM osm_changeset | |
WHERE num_changes > 0 | |
AND created_at BETWEEN '20130401'::date AND '20140401'::date) | |
AS um GROUP BY user_name) | |
AS mon | |
WHERE months >= 3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment