let’s say i have this
id | center | right |
---|---|---|
1 | Two | NULL |
1 | NULL | Three |
and want to be like this
id | center | right |
---|---|---|
1 | Two | Three |
my first table is just a representation of what actually I am encountering, everything will be appreciated, thank you in advance.
2
Answers
You can group by the
id
column and the the max values of the other recordsYou can group by id and group_concat the columns like this
https://www.db-fiddle.com/f/9phZ7EpRUS4FNRBZRdSYZa/116