SELECT list is not in GROUP BY clause and contains nonaggregated column
<p>Receiving the following error:</p>

<pre><code>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
</code></pre>

<p>When running the following query:</p>

<pre><code>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 ;
</code></pre>

<p>Using the MySQL world test database (<a href="http://dev.mysql.com/doc/index-other.html" rel="noreferrer">http://dev.mysql.com/doc/index-other.html</a>). No idea why this is happening. Currently running MYSQL 5.7.10. </p>

<p>Any ideas??? :O</p>