reverse query order for SortedTable