Skip to content

Instantly share code, notes, and snippets.

@paulp
Created November 29, 2016 19:55
Show Gist options
  • Save paulp/5c60f9ee3dd3743b9ae5db4d250545aa to your computer and use it in GitHub Desktop.
Save paulp/5c60f9ee3dd3743b9ae5db4d250545aa to your computer and use it in GitHub Desktop.
Sample query for ghtorrent bigquery tables: counting scala commits
select u.login as login, count(c.id) as ccount
from [ghtorrent-bq:ght.project_commits] pc join
[ghtorrent-bq:ght.commits] c on pc.commit_id = c.id join
[ghtorrent-bq:ght.projects] p on p.id = pc.project_id join
[ghtorrent-bq:ght.users] u on c.author_id = u.id,
where p.language = 'Scala' AND p.forked_from is null
group by login
order by ccount desc
@paulp
Copy link
Author

paulp commented Nov 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment