I have a table with many timestamps in it, some of which may be null. Is there a way to combine them all and keep the most recent timestamp so I don't have to reference each timestamp individually?
For example, given this over-simplified example:
SELECT blah FROM foo WHERE ts1 >= '2018-04-17' OR ts2 >= '2018-04-17' OR ts3 >= '2018-04-17';
I suspect there must be a way to turn it into something like this:
SELECT blah, somefunc(ts1, ts2, ts3) AS ts FROM foo WHERE ts >= '2018-04-17';