Created
September 3, 2016 21:45
-
-
Save juanpabloaj/73951664455e585646ee6353cddbeb46 to your computer and use it in GitHub Desktop.
Bigquery, Python packages downloaded by country
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
-- https://bigquery.cloud.google.com/dataset/the-psf:pypi | |
SELECT concat( | |
country_code, '_', REGEXP_EXTRACT(details.python, r'^([2-3]).[0-9].*') | |
) as country_python, count(*) as downloads | |
FROM ( | |
TABLE_DATE_RANGE([the-psf:pypi.downloads], | |
TIMESTAMP('2016-01-01'), TIMESTAMP('2016-08-31')) | |
) | |
group by country_python order by downloads desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment