Jul 4, 2022 · 2 min readMongoDB query get n records of each group (aggregation)For example, you might want to get 5 members of each group in your application.#mongodb #database #nosql