🔍
Sorting
Sorting query results is done with the sixth argument in a select. The argument must contain a nested list of fields to sort with direction:
o)t:((+:)`a`b`c!(1 2 3;3 4 5;6 7 8));
o)0N#.(?[t;();0b;`a`c!`a`c;();((>:;`a);(<:;`b))])
a c
---
3 8
2 7
1 6
o)
Here the monadic <
means ascending order, >
- the descending one.