title: Apply "ORDER BY" on a "UNION" (Mysql)
body: <p>So, everything is in the title.</p>
  <p>I am looking to merge the result of two requests and order the result together (as in, not one after the other).
  =&gt; I was thinking of applying a union and ordering them.
  It didn't work.</p>
  <p>I looked around like here <a href="https://stackoverflow.com/questions/4715820/how-to-order-by-with-union">on Stack</a> or here <a href="https://www.developpez.net/forums/d6568/bases-donnees/langage-sql/probleme-requete-union-order-by/" rel="nofollow noreferrer">developpez (!!french website)</a>. I've tried the different examples and suggestions, but no success.
  It seems from what I read that it's because I am working on Mysql.</p>
  <p>Anyway, here are my attempts, and the results.</p>
  <p>My original 2 requests:</p>
  <pre><code>SELECT * FROM user_relation WHERE from_user_id = 1
  List item
  SELECT * FROM user_relation WHERE to_user_id = 1
  </code></pre>
  <p>This result of a list made of the result of the first select (ordered by index key) followed by the result of 2nd select ordered by index key.</p>
  <p>Attempt 1:</p>
  <pre><code>(SELECT * FROM user_relation WHERE from_user_id = 1 ORDER BY trust_degree)
  UNION
  (SELECT * FROM user_relation WHERE to_user_id = 1 ORDER BY trust_degree)
  </code></pre>
  <p>The request ran, but the result was the same as the original request: result of first select (ordered by index key) followed by the results of the second request.</p>
  <p>Attempt 2:</p>
  <pre><code>(SELECT * FROM user_relation WHERE from_user_id = 1 ORDER BY trust_degree)
  UNION
  (SELECT * FROM user_relation WHERE to_user_id = 1 ORDER BY trust_degree)
  ORDER BY trust_degree
  </code></pre>
  <p>Request ran, result same as attempt 1, but with a warning in the Mysql logic:<br />
  (this type of close has been already analysed (ORDER BY))</p>
  <p>Attempt 3:</p>
  <pre><code>(SELECT * FROM user_relation WHERE from_user_id = 1
  UNION
  SELECT * FROM user_relation WHERE to_user_id = 1)
  ORDER BY trust_degree
  </code></pre>
  <p>Did not run, but an error #1064 - syntax error near UNION.</p>
  <p>Attempt 4:</p>
  <pre><code>SELECT *
  FROM (
  (SELECT * FROM user_relation WHERE from_user_id = 1)
  UNION
  (SELECT * FROM user_relation WHERE to_user_id = 1)
  )
  ORDER BY trust_degree 
  </code></pre>
  <p>Did not run, and a nice list of 6 errors.
  Any suggestions?</p>