skip to Main Content

Find one user then get their ranking based on their total points using MongoDB

So I got the following data: Users collection { _id: ObjectId("62a2a0422ec90fea68390aaa"), name: 'Robert Yamashita', username: 'robyama', email: '[email protected]', }, { _id: ObjectId("62a2a0452ec90fea68390aad"), name: 'Charles X', username: 'cvx', email: '[email protected]', } Points collection { userId: ObjectId("62a2a0422ec90fea68390aaa"), action: 'Liked a post', points:…

VIEW QUESTION
Back To Top
Search