If you need to sort the results of a UNION, use this pattern:
( SELECT ... ) UNION ( SELECT ... ) ORDER BY
Without the parentheses, the final ORDER BY would belong to the last SELECT.