Reputation: 35
I have mysql table with format like this
Name - Date1 - Date2
After I got result
A - NULL - 1 A - 2 - NULL
I want to join these results as
A - 2 - 1
How to achieve this ?
Upvotes: 0
Views: 73
Reputation: 254916
SELECT Name, MAX(Date1), MAX(Date2) FROM tbl GROUP BY Name
Upvotes: 1