Fix the query pattern by adding one more order by