Report question

Question: How to join on subqueries using ARel?