A local-first personal finance app
Add example of orderBy with a descending order (#583)
Robert Dyer7b7f6c904ce2
diff --git a/docs/api/actual-ql/functions.md b/docs/api/actual-ql/functions.mdindex cf4b0a151a..6def3045c6 100644--- a/docs/api/actual-ql/functions.md+++ b/docs/api/actual-ql/functions.md@@ -23,6 +23,15 @@ q('transactions')This returns transactions with an income category sorted by category name. You can also pass an array to `orderBy` to sort by multiple fields.+You can also change the sort order by specifying either `asc` or `desc`:++```js+q('transactions')+ .filter({ 'category.is_income': true })+ .select('*')+ .orderBy({ 'category.name': 'desc' });+```+## Aggregate FunctionsYou can specify aggregate functions in `select` for things like sums and counts. An example: