title: Order by not working as expected after using group by
body: <p>I am attempting to get a list of messages, by grouping the <code>from_user_id</code> and <code>to_user_id</code> so they look like the screenshot below. Only, my problem is they do not seem to be ordering by the most recent.</p>
  
  <p>Here's a screenshot showing how they look:</p>
  
  <p><a href="https://i.stack.imgur.com/5MjmD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5MjmD.png" alt="enter image description here"></a></p>
  
  <p>Query:
  select </p>
  
  <pre><code>select 
  concat(to_user_id, from_user_id) as group_by,
  pm.*
  from personal_messages pm
  where (to_user_id = 1265) or (from_user_id = 1265)
  group by group_by
  order by id desc
  </code></pre>
  
  <p>Table Structure:</p>
  
  <p><a href="https://i.stack.imgur.com/DZNQj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DZNQj.png" alt="enter image description here"></a></p>