I have collection where each document has user related details. userid:1001,abc:1 userid:1001,abc:9 userid:1002,abc:1 userid:1001,abc:3
Something like this. I wanted to get count of userId which has maximum occurances. I need to do this on Mongo shell.
Any ideas?