Hacker News new | ask | show | jobs
by layer8 812 days ago
The simple trick is sort the respective columns one after the other, starting with the least significant one. E.g. if you want to sort by columns A, B, and C, first sort by C, then sort by B, then sort by A. If the sort is stable (which it should be), this will result in the desired multi-column-sorted state.

Of course, this isn’t intuitive in the sense of being self-evident, but once you know this method, it basically works almost everywhere.