Active Record is awesome. But how does ActiveRecord handle generating complex SQL queries? Under the hood it's handled by Arel. Most of the time, Rails developers don't have to know about how Arel works.
But sometimes Active Record can't satisfy our needs. Also Arel has many strengths not exposed through Active Record.
Let's experiment with Arel directly and wield great SQL power in database agnostic way.