Created
February 12, 2015 04:54
-
-
Save up1/b83f0613516155201e34 to your computer and use it in GitHub Desktop.
Demo :: Google BigQuery
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
select | |
repository_language, | |
type, | |
count(distinct(repository_url)) as active_repos_by_url, | |
count(repository_language) as events, | |
YEAR(created_at) as year, | |
QUARTER(created_at) as quarter | |
from [githubarchive:github.timeline] | |
where | |
( | |
type = 'PushEvent' | |
OR type = 'ForkEvent' | |
OR (type = 'IssuesEvent' AND (payload_action="opened" OR payload_action=="reopened")) | |
OR (type = 'CreateEvent' AND payload_ref_type="repository") | |
OR type = 'WatchEvent' | |
) | |
AND repository_language !='' | |
AND repository_url != '' | |
AND YEAR(created_at)= 2014 | |
AND QUARTER(created_at)=4 | |
group by | |
repository_language, | |
type, | |
year, | |
quarter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment