Skip to content

Commit 695f656

Browse files
author
Chris Turner
committed
03-Fetch_lang1.rst: add more order_by examples
1 parent f277c7e commit 695f656

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs-parts/queries/03-Fetch_lang1.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ For example, one could do the following:
6161
.. code-block:: python
6262
6363
data = query.fetch(order_by='name', limit=10, offset=5)
64+
data = query.fetch(order_by='name desc') # sort in descending order
65+
data = query.fetch(order_by=('name desc', 'year')) # by name first, year second
66+
data = query.fetch(order_by='KEY') # sort by the primary key
67+
data = query.fetch(order_by=('name', 'KEY desc')) # sort by name but for same names order by primary key
6468
6569
Usage with Pandas
6670
~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)