nice arel!

I've had a look at the sql this generates and it seems pretty sound.