I know this sounds like a "do my homework for me" question, but I've been struggling with recreating this query with ActiveRecord for a while and am now wondering if it's possible to do this without resorting to using I know this sounds like a "do my homework for m