Skip to content

Instantly share code, notes, and snippets.

@RanaivosonHerimanitra
Forked from thomasdarimont/github-mining.sql
Created January 21, 2017 14:46
Show Gist options
  • Save RanaivosonHerimanitra/07ef89b41fec9f99f1596675bfd4c608 to your computer and use it in GitHub Desktop.
Save RanaivosonHerimanitra/07ef89b41fec9f99f1596675bfd4c608 to your computer and use it in GitHub Desktop.
Sample query for github dataset in big-query
SELECT
cont.sample_repo_name,
repo.watch_count
FROM
[bigquery-public-data:github_repos.sample_contents] as cont
JOIN [bigquery-public-data:github_repos.sample_repos] as repo
ON cont.sample_repo_name = repo.repo_name
WHERE
cont.content CONTAINS 'findbugs-maven-plugin</artifactId>'
AND cont.sample_path LIKE 'pom.xml'
ORDER BY repo.watch_count DESC
LIMIT
40;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment