Getting Distinct values of multiple values in Mongodb
问题 Let's imagine I have the following collection of books (Edited out the ID field for compactness): { "author" : "Steve Jones", "title" : "Fun Stuff", "edition" : "2010" } { "author" : "Steve Jones", "title" : "Fun Stuff", "edition" : "2011" } { "author" : "Steve Jones", "title" : "Boring Stuff", "edition" : "2010" } { "author" : "Ben Johnson", "title" : "Other Stuff", "edition" : "2010" } What should I do I want to find only the latest edition of each book? In other words: I want to get a