title: ORDER BY alternative values from main- and subquery
body: <p>Right now I have a query that looks something like so:</p>
  
  <pre><code>SELECT id 
  FROM post_table post
  WHERE post.post_user_id = user_id
  ORDER BY (SELECT max(comment_created_date) 
            FROM comments_table WHERE comments_post_id = post.id) DESC,
   post.post_created_date DESC
  </code></pre>
  
  <p>My idea for this query was that it would order a series of posts like so</p>
  
  <pre><code>Post 1:
      created Date: Jan 1 2015
      comments : []
  
  Post 2:
       created Date: Jan 5 2015
       comments : []
  
  Post 3:
       created Date : December 1 2014
       comments: [
           0: Created Date: Jan 6 2015
        ]
  </code></pre>
  
  <p>So in this case the order the posts would be returned in is</p>
  
  <p>Post 3, Post 2, Post 1</p>
  
  <p>Because Post 3 has a comment that is newer than any other posts, and Post 2 was created before Post 1. </p>
  
  <p>But when I run the query, the posts are still all sorted by their created date and the query doesn't seem to take into account the comments created date.</p>