Last active
September 5, 2017 16:58
-
-
Save mesaugat/291bdad97c1360a908e307538e78f136 to your computer and use it in GitHub Desktop.
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
-- | |
-- Most unique commits per user from Jan 2016 to March 2017 | |
-- | |
-- https://bigquery.cloud.google.com/savedquery/39178653524:e4b670a18035460792b0554983dde6ad | |
-- | |
SELECT | |
u.login AS login, | |
u.location AS location, | |
COUNT(c.id) AS num_commits | |
FROM | |
[ghtorrent-bq.ght_2017_04_01.commits] c | |
JOIN ( | |
SELECT | |
login, | |
location, | |
id | |
FROM | |
[ghtorrent-bq.ght_2017_04_01.users] | |
WHERE | |
country_code = 'np') u | |
ON | |
c.author_id = u.id, | |
WHERE | |
DATE(created_at) BETWEEN DATE('2016-01-01') | |
AND DATE('2017-04-01') | |
GROUP BY | |
login, | |
location | |
ORDER BY | |
num_commits DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment