Created
January 27, 2019 15:46
-
-
Save dstufft/34c06916c404b7db92f3f629de8516a2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
ROUND(100 * SUM(CASE WHEN REGEXP_EXTRACT(details.installer.version, r"^([^\.]+)") IN ("18", "19") THEN 1 ELSE 0 END) / COUNT(*), 1) AS supports_518, | |
COUNT(*) as downloads | |
FROM `the-psf.pypi.downloads*` | |
WHERE | |
_TABLE_SUFFIX BETWEEN FORMAT_DATE("%E4Y%m%d", DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)) | |
AND FORMAT_DATE("%E4Y%m%d", CURRENT_DATE()) | |
AND details.installer.name = 'pip' | |
AND file.project = 'cryptography' | |
LIMIT 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment