Tweak query in digest rake task