table | order by column1 ASC, column2 DESC, column3
order by expression will sort the result set by the given columns.
- DESC orders by descending
- ASC orders by ascending
Be aware of cardinality here. This is a very memory intensive operation, as the result set needs to be kept available as the sort runs.