Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.parsed_data.aggregate(
- {
- $match : {$or: [{"Origin.Country" : "FR"}, {"Destination.Country" : "FR"}]}
- },
- {$unwind: "$Segments"},
- {
- $group : {_id : "$Segments.Carrier", "total" : { $sum : 1 } }//_id : "$Origin.Code"
- }
- ,
- {
- $sort : {total : -1}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement