Database Query Error:

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

for query

SELECT id, name, lat, lon, MAX(type) type
			FROM mybo_cities
			WHERE 1
				AND NOT (lat < '45.5' OR lat > '49.8' OR lon < '9' OR lon > '18')
				AND (0  OR type='1'  OR type='2'  OR type='5' )
			GROUP BY lat, lon
			ORDER BY type ASC