Answers for "group by in ruby mongoid"

0

group by in ruby mongoid

Lead.where(client_id: client.id.to_s).collection.aggregate([{"$group"=>{ :_id=> "$sales_id" , :count=>{"$sum"=>1} } }, {"$match": { count: { "$gte": 3 } }} ]).to_a
Posted by: Guest on October-01-2020

Python Answers by Framework

Browse Popular Code Answers by Language