title: Use query value in same query
body: <p>If I have one query with two selects, can I use a value from the first select in the second select?</p>
  
  <p>i.e:</p>
  
  <pre><code>(SELECT post_id AS post_1 FROM posts WHERE user_id = 100) UNION (SELECT post_id AS post_2 FROM posts WHERE user_id = post_1)
  </code></pre>
  
  <p>The above doesn't work, so how can I do this?</p>