Mongodb – Mongo query replace with count instead of sum
I have below aggregate mongo query & want to use mongo count instead of sum to check the performance. collection sample : [ { "rate": 500, "orderDate": 20230101, "username": "Brad" }, { "rate": 20, "orderDate": 20230101, "username": "Lewis" }, {…