diff --git a/client/space_lua/query_test.lua b/client/space_lua/query_test.lua index a61ebe15..4b208647 100644 --- a/client/space_lua/query_test.lua +++ b/client/space_lua/query_test.lua @@ -3105,4 +3105,4 @@ do ]] assertEquals(#r, 3) assertEquals(r[1].name, "Carol") -end +end \ No newline at end of file diff --git a/website/Space Lua/Lua Integrated Query.md b/website/Space Lua/Lua Integrated Query.md index ea515e4a..d82e2df2 100644 --- a/website/Space Lua/Lua Integrated Query.md +++ b/website/Space Lua/Lua Integrated Query.md @@ -44,6 +44,13 @@ If an aggregate function call is used for projection (`select`), the general syn See [[Space Lua/Lua Integrated Query/Aggregating]] for details. +Aggregate functions support an optional intra-aggregate `order by` and/or `filter` clause: + + ( [order by [asc|desc] [nulls {first|last}], ...]) + ( ...) filter(where ) + +These can be combined. See [[Space Lua/Lua Integrated Query/Aggregating]] for details. + LIQ operates on any Lua collection. For instance, to sort a list of numbers in descending order: