File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,15 @@ Session & dj.top(limit=10, order_by='session_date')
229
229
```
230
230
231
231
The result of this expression returns the first 10 rows of ` Session ` and sorts them
232
- by their ` session_date ` in ascending order. If the ` order_by ` argument was instead: ` session_date DESC ` , then it would be sorted in descending order.
232
+ by their ` session_date ` in ascending order.
233
+
234
+ ### ` order_by `
235
+
236
+ | Example | Description |
237
+ | -------------------------------------------| -----------------------------------------------------------------------------------|
238
+ | ` order_by="session_date DESC" ` | Sorts by ` session_date ` in * descending* order |
239
+ | ` order_by="KEY" ` | Sorts by the primary key(s) |
240
+ | ` order_by=["subject_id", "session_date"] ` | Sorts by ` subject_id ` , then sorts matching ` subject_id ` s by their ` session_date ` |
233
241
234
242
The default values for ` dj.top ` parameters are ` limit=1 ` , ` order_by="KEY" ` , and ` offset=0 ` .
235
243
You can’t perform that action at this time.
0 commit comments