Skip to content

Commit db80a8c

Browse files
authored
Merge pull request #1649 from hugovk/sql-syntax-highlight
Use syntax highlighting for BigQuery queries
2 parents 3dc5d16 + b8439b2 commit db80a8c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/guides/analyzing-pypi-package-downloads.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Counting package downloads
103103
The following query counts the total number of downloads for the project
104104
"pytest".
105105

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

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

150-
::
150+
.. code-block:: sql
151151
152152
#standardSQL
153153
SELECT
@@ -185,7 +185,7 @@ Python versions over time
185185
Extract the Python version from the ``details.python`` column. Warning: This
186186
query processes over 500 GB of data.
187187

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

231-
::
231+
.. code-block:: sql
232232
233233
SELECT
234234
CONCAT('https://files.pythonhosted.org/packages', path) as url

0 commit comments

Comments
 (0)