File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -229,7 +229,15 @@ Session & dj.top(limit=10, order_by='session_date')
229229```
230230
231231The 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 ` |
233241
234242The default values for ` dj.top ` parameters are ` limit=1 ` , ` order_by="KEY" ` , and ` offset=0 ` .
235243
You can’t perform that action at this time.
0 commit comments