I have searched many places but found no result. I want to have a query like this:
SELECT * FROM( sub_query ) AS virtual_table
But it looks like Arel doesn't allow me to do so. Arel just allow some structure such as:
SELECT * FROM table_name as virtual_table
How can I overcome this limit in Arel.