Guest User

Untitled

a guest
Oct 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. ```sql
  2. SELECT
  3. REGEXP_EXTRACT(details.python, r"^([^\.]+\.[^\.]+)") as python_version,
  4. details.installer.name,
  5. details.installer.version,
  6. COUNT(*) as total_downloads
  7. FROM
  8. TABLE_DATE_RANGE(
  9. [the-psf:pypi.downloads],
  10. TIMESTAMP("20160114"),
  11. CURRENT_TIMESTAMP()
  12. )
  13. GROUP BY
  14. python_version,
  15. details.installer.name,
  16. details.installer.version
  17. ORDER BY
  18. total_downloads DESC
  19. LIMIT 100
  20. ```
  21.  
  22. |Row|python_version|details_installer_name|details_installer_version |total_downloads |
  23. |-|-|-|-|-|
  24. |1|2.7|pip|9.0.1|2329351194 |
  25. |2|2.7|pip|6.0.8|1026930256 |
  26. |3|2.7|pip|8.1.2|827186887 |
  27. |4|2.7|pip|1.5.4|749604308 |
  28. |5|null|bandersnatch|1.11|714791614 |
  29. |6|2.7|null|null|638936352 |
  30. |7|2.7|pip|6.1.1|436756002 |
  31. |8|3.5|pip|9.0.1|321444466 |
  32. |9|2.7|pip|7.1.2|284777575 |
  33. |10|3.6|pip|9.0.1|262371972 |
  34. |11|2.7|pip|8.1.1|261798294 |
Add Comment
Please, Sign In to add comment