Miscellaneous Functions To cause MySQL to accept the query, use  ANY_VALUE() : SELECT ANY_VALUE(age) FROM t GROUP BY age-1; ANY_VALUE()  can be used for queries that refer to aggregate functions in the absence of a  GROUP BY clause: Without  GROUP BY , there is a single group and it is nondeterministic which  name  value to choose for the group.  ANY_VALUE()  tells MySQL to accept the query: SELECT ANY_VALUE(name), MAX(age) FROM t; It may be that, due to some property of a given data set, you know that a selected nonaggregated column is effectively functionally dependent on a  GROUP BY  column. For example, an application may enforce uniqueness of one column with respect to another. In this case, using  ANY_VALUE()  for the effectively functionally dependent column may make sense. For additional discussion, see Section 12.20.3, “MySQL Handling of GROUP BY” . BIN_TO_UUID()  is the inverse of  UUID_TO_BIN() . It converts a binary UUID to a string UUID and returns the result. The binary value should be a UUID as a  VARBINARY(16)  value. The return value is a  utf8  string of five hexadecimal numbers separated by dashes. (For details about this format, see the UUID()  function description.) If the UUID argument is  NULL , the return value is  NULL . If any argument is invalid, an error occurs. BIN_TO_UUID()  takes one or two arguments: For usage examples and information about time-part swapping, see the  UUID_TO_BIN()  function description. Returns the default value for a table column. An error results if the column has no default value. The use of  DEFAULT( col_name )  to specify the default value for a named column is permitted only for columns that have a literal default value, not for columns that have an expression default value. mysql>  UPDATE t SET i = DEFAULT(i)+1 WHERE id < 100; 2440 • DEFAULT( col_name ) •If  swap_flag  is 1, the UUID value is assumed to have its time-low and time-high parts swapped. These parts are swapped back to their original position in the result value. •If  swap_flag  is 0, the two-argument form is equivalent to the one-argument form. The string result is in the same order as the binary argument. •The two-argument form takes a binary UUID value and a swap-flag value: •The one-argument form takes a binary UUID value. The UUID value is assumed not to have its time- low and time-high parts swapped. The string result is in the same order as the binary argument. • BIN_TO_UUID( binary_uuid ) ,  BIN_TO_UUID( binary_uuid ,  swap_flag ) mysql>  SELECT name, MAX(age) FROM t; ERROR 1140 (42000): In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column ’mydb.t.name’; this is incompatible with sql_mode=only_full_group_by