Изменения в новых версиях / SQL:2023

-- *** before: ***
-- comparing values across columns of one row was a CASE
SELECT
    Name,
    CASE WHEN GNP > GNPOld THEN GNP ELSE GNPOld END AS BestGNP
FROM country

-- *** in version 2023: ***
SELECT
    Name,
    GREATEST(GNP, GNPOld) AS BestGNP,
    LEAST(GNP, GNPOld)    AS WorstGNP
FROM country

-- Support: MySQL, PostgreSQL and Oracle had both functions long before
-- the standard; MS SQL Server added them in 2022. SQLite spells them
-- MAX() and MIN() with several arguments, Firebird MAXVALUE() and
-- MINVALUE(). Access has neither - the CASE or IIF form stays.
-- Watch the NULLs: in Oracle and MySQL a single NULL makes the whole
-- call NULL, while PostgreSQL and MS SQL Server skip it.