In the Query Tool, the first column (eg. Categories) initially displays sorted in ascending order, and can be toggled to descending by clicking the header. If you then sort by any other column (eg. Total, Average or Count), then the sorting option on the first column is removed.
Also, if there are group categories, the expand/collapse arrow disappears, because the subcategories are sorted independently from the group. Sorting by the first column should return to the original order and state, including the expand/collapse arrow for group categories.