Mysql group by more than one row

Viewed 12

If I have a MySQL table looking something like this:

SURNAME MON TUE WED THU
James 2L 3L 1L
James 4L
Luke 3A
Luke 1A 2A
Luke 2B

Is it possible to run a MySQL query to get output like this:

SURNAME MON TUE WED THU
James 2L 4L 3L 1L
Luke 1A 3A 2B 2A

I have tried SELECT * FROM table GROUP BY SURNAME but only first row was returned...

0 Answers
Related