altsql-shell icon indicating copy to clipboard operation
altsql-shell copied to clipboard

Sort last table result

Open ewaters opened this issue 12 years ago • 0 comments

Similar to issue #1, it'd be nice to take the table result and sort it according to a different column.

Perhaps something like this:

altsql> select country, count(id) from people group by country;
altsql> .sort country asc;

The count(*) and group by was an expensive operation. You don't want to have to execute it again just to change the sort order, but you'd like to see the data resorted on a different column. If you wanted it resorted according to the second column, you could use positional selector:

altsql> .sort column 2 desc;

This would result in the data being re-rendered but according to the new sort order.

Optionally support multisort declarations.

ewaters avatar May 09 '12 19:05 ewaters