Diligent Interview Question

Mysql joins using raw queries and using active record