Skip to content

Instantly share code, notes, and snippets.

@hdemers
Created May 9, 2012 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hdemers/2647936 to your computer and use it in GitHub Desktop.
Save hdemers/2647936 to your computer and use it in GitHub Desktop.
Sample queries to GitHub BigQueries data. For the first GitHub Data Challenge.
-- La première requète pour les projets ayant le plus de fork
SELECT repository_name, MIN(repository_forks) as mini, MAX(repository_forks) as maxi, MAX(repository_forks) - MIN(repository_forks) as diff
FROM githubarchive:github.timeline WHERE type = "ForkEvent" AND LENGTH(actor_attributes_location) > 3 AND repository_forks > 200
GROUP BY repository_name
ORDER BY maxi DESC;
-- La deuxième requète pour la localisation et le nombre de fork en fonction du temps
SELECT created_at, actor_attributes_location, repository_forks
FROM githubarchive:github.timeline WHERE type = "ForkEvent" AND LENGTH(actor_attributes_location) > 3 AND repository_name = "bootstrap" AND repository_owner = "twitter" AND repository_fork = "false"
ORDER BY repository_forks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment