Skip to content

Instantly share code, notes, and snippets.

@dankohn
Created February 26, 2017 06:32
Show Gist options
  • Save dankohn/09e8ce913685b4f794a04dd6ffa2e783 to your computer and use it in GitHub Desktop.
Save dankohn/09e8ce913685b4f794a04dd6ffa2e783 to your computer and use it in GitHub Desktop.
Project commits
SELECT
repo_name AS repository,
EXACT_COUNT_DISTINCT(author.name) AS authors,
EXACT_COUNT_DISTINCT(committer.name) AS committers,
COUNT(*) AS commits
FROM
[bigquery-public-data:github_repos.commits]
WHERE
repo_name IN ( "torvalds/linux",
"facebook/react-native",
"ansible/ansible",
"Microsoft/vscode",
"angular/angular",
"Automattic/wp-calypso",
"tensorflow/tensorflow",
"kubernetes/kubernetes")
AND committer.date >= TIMESTAMP("2016-01-01 00:00:00")
AND committer.date < TIMESTAMP("2017-01-01 00:00:00")
GROUP BY
repository
ORDER BY
commits DESC
repository authors committers commits
torvalds/linux 4029 273 76332
kubernetes/kubernetes 712 659 18726
Automattic/wp-calypso 241 207 12568
Microsoft/vscode 212 172 11997
ansible/ansible 1704 219 10158
tensorflow/tensorflow 478 196 8803
facebook/react-native 930 66 4631
angular/angular 284 67 2626
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment