I have a table that has multiple date columns, the following is an example of my table columns: tbl.user_id
, tbl.date_1
, tbl.date_2
, tbl.date_3
I need to come up with a query that will return user_id
and most_recent_date
where most most_recent_date
is the most recent date between date_1, date_2 and date_3. I think I need a nested select here but I can't work out the logic for it. I'm hoping someone could point me in the right direction here.