If STRICT_TRANS_TABLES is set in the sql_mode variable, the MySQL server is running in strict mode. Either disabling strict mode or writing the statement with ANY_VALUE() will fix this error.

Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'table.xyz' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in /var/www/examplecom/xyz.php:32
SELECT ANY_VALUE(table.x) as x, ANY_VALUE(table.y) as y
	GROUP BY x
	ORDER BY y DESC