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