Skip to content

Commit

Permalink
Merge pull request #1649 from hugovk/sql-syntax-highlight
Browse files Browse the repository at this point in the history
Use syntax highlighting for BigQuery queries
  • Loading branch information
chrysle authored Nov 24, 2024
2 parents 3dc5d16 + b8439b2 commit db80a8c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/guides/analyzing-pypi-package-downloads.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Counting package downloads
The following query counts the total number of downloads for the project
"pytest".

::
.. code-block:: sql
#standardSQL
SELECT COUNT(*) AS num_downloads
Expand All @@ -123,7 +123,7 @@ The following query counts the total number of downloads for the project
To count downloads from pip only, filter on the ``details.installer.name``
column.

::
.. code-block:: sql
#standardSQL
SELECT COUNT(*) AS num_downloads
Expand All @@ -147,7 +147,7 @@ Package downloads over time
To group by monthly downloads, use the ``TIMESTAMP_TRUNC`` function. Also
filtering by this column reduces corresponding costs.

::
.. code-block:: sql
#standardSQL
SELECT
Expand Down Expand Up @@ -185,7 +185,7 @@ Python versions over time
Extract the Python version from the ``details.python`` column. Warning: This
query processes over 500 GB of data.

::
.. code-block:: sql
#standardSQL
SELECT
Expand Down Expand Up @@ -228,7 +228,7 @@ column, which includes the hash and artifact filename.
.. note::
The URL generated here is not guaranteed to be stable, but currently aligns with the URL where PyPI artifacts are hosted.

::
.. code-block:: sql
SELECT
CONCAT('https://files.pythonhosted.org/packages', path) as url
Expand Down

0 comments on commit db80a8c

Please sign in to comment.