I have many users. Some may have the same 'top' (type of problem) and the timestamp will naturally be unique. I am trying to find users/documents with a specific top (i.e "top":1) but amongst those, I only want the one with the smallest/minimum timestamp.
db.collection.find( {'top':1} ).min("timestamp")
What am I doing wrong here? Thanks in advance!