Odbieranie następujący błąd:SELECT lista nie jest w klauzuli GROUP BY i zawiera nonaggregated kolumna
Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'world.country.Code' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Uruchamiając następujące zapytanie:
select countrylanguage.language, country.code, sum(country.population*countrylanguage.percentage/100)
from countrylanguage
join country on countrylanguage.countrycode = country.code
group by countrylanguage.language
order by sum(country.population*countrylanguage.percentage) desc ;
Korzystanie z MySQL testową świecie bazę danych (http://dev.mysql.com/doc/index-other.html). Nie mam pojęcia, dlaczego tak się dzieje. Obecnie działa MYSQL 5.7.10.
Jakieś pomysły ??? : O
Masz 'opcję ONLY_FULL_GROUP_BY' enabled, co usuwa luźne reguły MySQL dotyczące 'GROUP BY'. – Barmar
Ustawienia domyślne dla tej opcji zostały zmienione w MySQL 5.7. – Barmar