Skip to content

Instantly share code, notes, and snippets.

@thomasdarimont
Created June 29, 2016 20:52
Show Gist options
  • Save thomasdarimont/5dccb6758f2222ddb818957357119fc7 to your computer and use it in GitHub Desktop.
Save thomasdarimont/5dccb6758f2222ddb818957357119fc7 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