Why ORDER BY is being lost in case of UNION