update query order