Setting the order of the rows inside each of the queries is not allowed, unless the queries are parenthesized, but still this is not how the final result will be ordered.
Remove the 2 ORDER BY
clauses and add only 1 at the end, like:
order by grade desc, name
which will apply to the resultset of the unioned queries.
CLICK HERE to find out more related problems solutions.