_:n21f6ff63eebe4c0f83e38c5d6e8888acxb0
<http://schema.org/text>
"db.gamescores.aggregate([\n   {\n      $group:\n      {\n         _id: {\"gameId\": \"$gameId\"},\n         gamescores:\n            {\n               $minN:\n                  {\n                     input: [\"$score\",\"$playerId\"],\n                     n: { $cond: { if: {$eq: [\"$gameId\",\"G2\"] }, then: 1, else: 3 } }\n                  }\n            }\n      }\n   }\n] )"
<https://www.mongodb.com/docs/v7.0/reference/operator/aggregation/minN/>