Skip to content

Instantly share code, notes, and snippets.

@stestagg
Created May 19, 2017 19:45
Show Gist options
  • Save stestagg/65d5d6b17cc18e63160a7af51da4f9d0 to your computer and use it in GitHub Desktop.
Save stestagg/65d5d6b17cc18e63160a7af51da4f9d0 to your computer and use it in GitHub Desktop.
PyPi Query
SELECT
file.project,
count(distinct details.system.release) as distinct_setups,
count(*) as num_downloads
FROM `the-psf.pypi.downloads2017*`
WHERE LOWER(file.project) in ('cpickle','json', 'sqlite3','sqlite', 'marshal','math','os','pickle','platform','socket','stat','string','sys','tempfile')
and details.installer.name = 'pip'
GROUP BY file.project
ORDER BY num_downloads desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment