ANY_VALUE()
ANY_VALUE() is a SQL function in the MySQL Specific category. MySQL: suppresses ONLY_FULL_GROUP_BY errors by returning any value from the group (non-deterministic). The syntax is ANY_VALUE(expression). It accepts expression. It returns arbitrary group value. A typical example: SELECT department, ANY_VALUE(name), AVG(salary) FROM employees GROUP BY department; -- Without ANY_VALUE, this would error in strict ONLY_FULL_GROUP_BY mode -- ANY_VALUE picks an arbitrary name from each department A close relative is AUTO_INCREMENT, which mySQL auto-generates sequential integer values for this column. Commonly used with PRIMARY KEY. A close relative is ENGINE, which specifies the MySQL storage engine. InnoDB (default) supports transactions and foreign keys. MyISAM is faster for read-heavy. A close relative is LAST_INSERT_ID(), which returns the AUTO_INCREMENT value generated by the most recent INSERT in the current connection. More about this category: MySQL-specific features — AUTO_INCREMENT, ENGINE, SHOW TABLES, LIMIT. Related MySQL Specific entries: AUTO_INCREMENT, ENGINE, LAST_INSERT_ID(), ON DUPLICATE KEY UPDATE, LOAD DATA INFILE, LOCK TABLES / UNLOCK TABLES, FIND_IN_SET(), CHARACTER SET / COLLATION.