MongoDB Bytes #7: Aggregation Challenge

Hope you had a great time learning about Aggregation Pipeline, Stages and Operators through our first-ever MongoDB Byte:

Now, it’s time to test our knowledge through the following quiz.
The dataset used for this quiz can be accessed via the following command:

mongosh “mongodb+srv://read_only:OxxrqgRYA1PFs0tf@cluster0.k52jp.mongodb.net/ipl”

1. Find the most economical bowler who has delivered at least 300 balls.

We need to find the bowler who has conceded the least number of runs per ball and has delivered at least 300 balls as well.

  • Rashid Khan
  • GD McGrath
  • Sohail Tanvir
  • M Muralitharan
0 voters

2. Find the batsman who has scored the most number of runs in death overs.

FYI: Over no. 16, 17, 18 & 19 are considered as death over in a T20 match.
Hint: You can utilize the $in operator to filter documents on the basis of over.

  1. MS Dhoni
  2. KA Pollard
  3. RG Sharma
  4. AB de Villiers
0 voters

3. Find the batsman who has hit the most number of boundaries against ‘Mumbai Indians’

FYI: A boundary is considered when a batsman scores either 4 or 6 runs on a single ball.

  1. AB de Villiers
  2. S Dhawan
  3. CH Gayle
  4. SK Raina
0 voters

If you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
MongoDB

6 Likes