I'm trying to build some thing similar to Facebook's news feed. I mean when multiple users in my friend list like same post, we will show only single result in th news feed saying that friend1, friend2, frnd3, etc., like this xyz post.

From this table I would like to group by on these three columns (

action

,

object_type

,

object_id

) and a list of users for this object.

SELECT *
FROM mytable
GROUP BY action, object_type, object_id

But this gave me some weird results, and I was expecting a list of users. I' really don't have any clue how to do that in this query.