MySQL UNION with Multiple ORDER BY
I'm not exactly sure what you re trying to achieve, but if you want the rows from the first leg to be ordered first, then you can add an attribute that determines from which leg the row belongs:
select myint from (
    select 1 as origin, myint from table_a where myint &lt; 5
    union
    select 2 as origin, myint from table_a where myint &gt; 5
) as t
order by origin, myint desc;

myint
4
3
2
1
9
8
7
6

Fiddle