all_query with ordering