I have multiple records belonging to the same individuals. How to group them horizontally?
For example, the list would be following:
- a
- b
- c
- d
I would need a result like
3...
- a b
- c
- d
I don't know in advance the number of records for each individual...
I would prefer MySQL solution and not PHP loops.
A simple way would be to use constrains/counts for the primary keys which are different. However I am getting invalid use of 'group by' error. Limits can be used for all the table only. I need second, third,... highest values for each group.
How to do this?