I need a Query to get distinct keys with sorted on basis of score in Mongodb 1.6.5
I have records Like
{key ="SAGAR"
score =16
note ="test1"
}
{key ="VARPE"
score =17
note ="test1"
}
{key ="SAGAR"
score =16
note ="test2"
}
{key ="VARPE"
score =17
note ="test2"
}
I need a query which sorts all records on score and returns me distinct key.....