Reverse query order to ensure order is created at first