I’ve seen the following question on **StackOverflow**, **[Intelligent MySQL GROUP BY for Activity Streams](https://stackoverflow.com/questions/14004322/intelligent-mysql-group-by-for-activity-streams)** posted by **Christian Owens 12/12/12**. 

So I decided to try out the same approach, make two tables similar to those of his. And then I pretty much copied his query which I do understand. 
This is what I get out from my sandbox: 

```
Array
(
    [0] => Array
        (
            [id] => 0
            [user_id] => 1
            [action] => published_post
            [object_id] => 776286559146635
            [object_type] => post
            [stream_date] => 2015-11-24 12:28:09
            [rows_in_group] => 1
            [in_collection] => 0
        )

)

```

I am curious, since looking at the results in **Owens** question, I am not able to fully get something, and does he perform additional queries to grab the actual metadata? And if yes, does this mean that one can do it from that single query or does one need to run different optimized sub-queries and then loop through the arrays of data to render the stream itself. 

Thanks a lot in advanced. 

```
Array
(
    [0] => Array
        (
            [id] => 0
            [user_id] => 1
            [fullname] => David Anderson
            [action] => hearted
            [object_id] => array (
              [id] => 3438983
              [title] => Grand Theft Auto
              [Category] => Games
            )
            [object_type] => product
            [stream_date] => 2015-11-24 12:28:09
            [rows_in_group] => 1
            [in_collection] => 1
        )

)

```