Created
May 23, 2016 21:21
-
-
Save lopuhin/00e793a4bebedfcc1880d6d5957860e3 to your computer and use it in GitHub Desktop.
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 | |
REGEXP_EXTRACT(details.python, r"^([^\.]+)") as python_version, | |
COUNT(*) as total_downloads, | |
FROM | |
TABLE_DATE_RANGE( | |
[the-psf:pypi.downloads], | |
TIMESTAMP("20160521"), | |
TIMESTAMP("20160524") | |
) | |
WHERE | |
file.project = "django" | |
GROUP BY | |
python_version | |
ORDER BY | |
total_downloads DESC | |
LIMIT 100 | |
-- Results: | |
-- 2 41426 | |
-- 3 17702 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment