We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I noticed that for some older surveys we seem to have multiple copies of the same survey for the same user, which should in theory not be possible.
It's probably some bug due to importing those responses from a previous system, but I thought I'd make a note of it.
Aggregation used:
[ { // Filter documents where both userId and editionId exist $match: { userId: { $exists: true, $ne: null }, editionId: { $exists: true, $ne: null } } }, { // Group by userId and editionId $group: { _id: { userId: "$userId", editionId: "$editionId" }, count: { $sum: 1 } // Count the documents in each group } }, { // Optional: Sort by count in descending order $sort: { count: -1 } }, { // Optional: Project the fields for better readability $project: { _id: 0, // Hide the _id field userId: "$_id.userId", editionId: "$_id.editionId", count: 1 } } ]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I noticed that for some older surveys we seem to have multiple copies of the same survey for the same user, which should in theory not be possible.
It's probably some bug due to importing those responses from a previous system, but I thought I'd make a note of it.
Aggregation used:
The text was updated successfully, but these errors were encountered: