Sorted Out Query Structures