Skip to content

Instantly share code, notes, and snippets.

@dankohn
Created February 26, 2017 06:32
Show Gist options
  • Select an option

  • Save dankohn/09e8ce913685b4f794a04dd6ffa2e783 to your computer and use it in GitHub Desktop.

Select an option

Save dankohn/09e8ce913685b4f794a04dd6ffa2e783 to your computer and use it in GitHub Desktop.

Revisions

  1. dankohn created this gist Feb 26, 2017.
    22 changes: 22 additions & 0 deletions project_commits.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    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
    9 changes: 9 additions & 0 deletions results.csv
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    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