在robot 3t 中 MongoDB 删除重复
db.getCollection('2021-07-29').aggregate([{
$group: { _id: {symbol: '$symbol'},count: {$sum: 1},dups: {$addToSet: '$_id'}}
},
{
$match: {count: {$gt: 1}}
}]).forEach(function(doc){
doc.dups.shift();
db.getCollection('2021-07-29').remove({_id: {$in: doc.dups}});
})