This is referring to the question i asked before, and got a really quick answaer ([max count together in an sql query](https://stackoverflow.com/questions/751156/max-count-together-in-an-sql-query)). The Problemset is similar, but the solution in the prevous question would force me to access a db in a loop which will cause performance problems. So what i have now, after some joins is:

```
    id | description
     0 | bla
     0 | blub
     0 | bla
     1 | blablub
     1 | bla
   ... | ...

```

As u can see, now the id is not a primary key anymore. What i want is to get the most used description for each id in the resultset. It should look something like this:

```
 id | most_popular_description | times_the_desc_appeared_for_an_id
  0 |                      bla |                                 2
  1 |                  blablub |                                 1
... |                      ... |                               ...

```