Find the types and details for all premises and order by the premise type.
return premises ;return types of  #1 ;return details of  #1 ;return #2 ,   #3 ;return #4 sorted by #2
['select', 'project', 'project', 'union', 'sort']