Can you optimize this mongo query? [{
    $sort: {
        _id: -1
    }
}, {
    $match: {
        'payout.status': 'paid',
        'payout.resolutionTime': {
            $exists: true
        }
    }
}, {
    $set: {
        payoutTimeSpent: {
            $divide: [{
                    $subtract: [
                        '$payout.resolutionTime',
                        '$payout.sentTime'
                    ]
                },
                60000
            ]
        }
    }
}, {
    $group: {
        _id: {
            $dateToString: {
                format: '%Y-%m-%d',
                date: {
                    $toDate: '$payout.resolutionTime'
                }
            }
        },
        TiempoPagoMin: {
            $avg: '$payoutTimeSpent'
        }
    }
}] The response should be in all capital letters.
user