A Database Error Occurred

Error Number: 1055

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'petinho1_wsdb.w.WhiskyID' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

SELECT w.WhiskyID, w.WhiskyName, w.ABV, w.Picture, AVG(wt.Score) as Score, MAX(wt.Score) as max_score, MIN(wt.Score) as min_score, COUNT(wt.WhiskyID) as cwid FROM whisky w, whisky_tastings wt where w.WhiskyID=wt.WhiskyID AND w.isActive=1 GROUP BY w.WhiskyName HAVING COUNT(wt.WhiskyID) > 4 Order By Score desc LIMIT 10;

Filename: models/Data_model.php

Line Number: 220