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

-- *** before: ***
-- a column outside GROUP BY had to be wrapped in MIN or MAX,
-- which compares every value for nothing
SELECT CountryCode, COUNT(*) AS Cities, MIN(Name) AS SomeCity
FROM city
GROUP BY CountryCode

-- *** in version 2023: ***
SELECT CountryCode, COUNT(*) AS Cities, ANY_VALUE(Name) AS SomeCity
FROM city
GROUP BY CountryCode

-- Support: MySQL since 5.7.5, PostgreSQL 16, MS SQL Server 2022 and
-- Oracle 21c. SQLite allows a bare column instead and returns an
-- arbitrary row value; Firebird and Access have neither the function
-- nor the shortcut.