title: Subqueries in activerecord
body: <p>With SQL I can easily do sub-queries like this</p>
  
  <pre><code>User.where(:id =&gt; Account.where(..).select(:user_id))
  </code></pre>
  
  <p>This produces:</p>
  
  <pre><code>SELECT * FROM users WHERE id IN (SELECT user_id FROM accounts WHERE ..)
  </code></pre>
  
  <p>How can I do this using rails' 3 activerecord/ arel/ meta_where? </p>
  
  <p>I do need/ want real subqueries, no ruby workarounds (using several queries).</p>