(SELECT id, value FROM new_table WHERE id < 5 ORDER BY value asc) UNION (SELECT id, value FROM new_table WHERE id >= 5 ORDER BY value desc);