You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
Hi,
I need some tips and tricks on the following problem.
I have a collection where I story activity per user. Field are
user_id, activity and created_at.
I want to show the last 20 entries but only a user can only show up
once in the result. So the last activity per user sorted by created_at
descending.
I have looked into using map reduce for this but I am stuck at the
moment with any kind of result that works.
Jeroen
Eliot Horowitz
unread,
Jul 20, 2011, 5:48:17 AM7/20/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
I think you should try just getting data sorted by time and then doing the unique filter client side.