Order By Fix

added order by to query so it won’t fail with random cost model