I have the following MySQL table:
col1 col2 col3 col4 col5
A abc val2 NULL NULL
A abc NULL val3 val4
B def value2 NULL value3
B def NULL value4 NULL
I want the output as
col1 col2 col3 col4 col5
A abc val2 val3 val4
B def value2 value4 value3
What should be the query?
You should use group by: