insert into table (col1, col2, col3, col4) values ('2015-01-01','2014-01-01','2013-01-01', NULL )
I am looking for a function like this:
select least_date(col1, col2, col3, col4) from table
result: '2013-01-01'
How can I get the minimum date of several columns, excluding nulls?