mssql: no native GREATEST before SQL Server 2022 -- a portable nested
CASE expression is used so it works on every supported SQL Server
version (not just 2022+).
sqlite: no GREATEST keyword -- but scalar MAX(v1, v2, ...) (called
with 2+ args) behaves exactly like GREATEST, so that is used instead.
every other dialect here has native GREATEST(...).
GREATEST(v1, v2, ...).GREATESTbefore SQL Server 2022 -- a portable nestedCASEexpression is used so it works on every supported SQL Server version (not just 2022+).GREATESTkeyword -- but scalarMAX(v1, v2, ...)(called with 2+ args) behaves exactly likeGREATEST, so that is used instead.GREATEST(...).