Reputation: 1341
could someone tell my how I could make this, please with MySQL statement?
Table input:
col1 col2 col3
B C
A D
A E
Output should be:
line 1: B C
line 2: A D E
THe maximal rows for every input line in INPUT Table is 2. (here you see it with A)
Thanks
Upvotes: 0
Views: 31
Reputation: 562358
Given the example you show, this would work:
SELECT col1, MAX(col2), MAX(col3)
FROM InputTable
GROUP BY col1
Upvotes: 1