fix: ordinamento membri (namecomplete (concat: name, surname, username)
This commit is contained in:
23
mongodb/favorite.mongodb.js
Normal file
23
mongodb/favorite.mongodb.js
Normal file
@@ -0,0 +1,23 @@
|
||||
use('test_FreePlanet');
|
||||
|
||||
let aggregation = [
|
||||
{
|
||||
$match: {
|
||||
idapp: "13",
|
||||
"profile.favorite": {
|
||||
$elemMatch:
|
||||
{ id: '10256', tab: 4 }
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
$group:
|
||||
{
|
||||
_id: null,
|
||||
count: { $sum: 1 },
|
||||
}
|
||||
},
|
||||
{ $project: { _id: 0 } }
|
||||
];
|
||||
|
||||
db.users.aggregate(aggregation);
|
||||
Reference in New Issue
Block a user