I would like to know how I can reproduce the following query as map reduce or any juice function from MongoMapper or MongoID:
Event.find(:all,:select=>'events.company,SUM(price) as total_price',
:group=> 'company',:order => ' total_price DESC, created_at DESC')