Created
May 9, 2012 18:50
-
-
Save hdemers/2647936 to your computer and use it in GitHub Desktop.
Sample queries to GitHub BigQueries data. For the first GitHub Data Challenge.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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