Lab: $group and Accumulators

Can someone please review the pipeline and stages which I have written:

var pipeline = [
  {
    '$match': {
      'awards': {
        '$exists': true
      }
    }
  }, {
    '$addFields': {
      'oscar_won': {
        '$cond': [
          {
            '$regexMatch': {
              'input': '$awards', 
              'regex': new RegExp('Won [0-9] oscar', 'i')
            }
          }, {
            '$arrayElemAt': [
              {
                '$split': [
                  '$awards', ' '
                ]
              }, 0
            ]
          }, 'N/A'
        ]
      }
    }
  }, {
    '$match': {
      'oscar_won': {
        '$ne': 'N/A'
      }
    }
  }, {
    '$project': {
      '_id': 0, 
      'title': 1, 
      'rating': '$imdb.rating', 
      'oscar_won': 1
    }
  }, {
    '$group': {
      '_id': {}, 
      'lowest_rating': {
        '$min': '$rating'
      }, 
      'highest_rating': {
        '$max': '$rating'
      }, 
      'avg_rating': {
        '$avg': '$rating'
      }, 
      'deviation': {
        '$stdDevSamp': '$rating'
      }
    }
  }, {
    '$project': {
      'rounded_avg': {
        '$round': [
          '$avg_rating', 4
        ]
      }, 
      'rounded_dev': {
        '$round': [
          '$deviation', 4
        ]
      }
    }
  }, {
    '$count': 'title'
  }
]

I am not getting accurate values. Please correct me if I am wrong or any optimization is required.

Hi @Rohitha_Udayasankar,

I can check that you have successfully completed the lab :clap:

Please feel free to reach out if you have any additional questions.

Kind Regards,
Sonali