Is it possible to SELECT the minimum or maximum among two or more values. I\'d need something like this:
SELECT
SELECT MAX_VALUE(A.date0, B.date0) AS d
I suppose you are looking for:
GREATEST()
and
LEAST()