Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Database Foundations SQL Calculating, Aggregating and Other Functions Grouping, Joining and Cleaning Up

New Version of MYSQL prevents me from following video.

Hi, I'm following this video using MYSQL version 5.7.13 on Mysql workbench 6.3.6.

When the sql query is adjusted to use a LEFT OUTER JOIN instead of a JOIN at 3 mins 20 seconds in the video, if you follow in workbench then the following error is listed. 'Error code 1055 - expression is not in select list'. After checking, this is because the new version of mysql includes a mode (a sql configuration option) called ONLY_FULL_GROUP_BY. This mode can be changed by running the following:

SELECT @@sql_mode first, to get a comma-separated list of the modes enabled, then SET it to this list without the ONLY_FULL_GROUP_BY option.

(from http://stackoverflow.com/questions/23921117/disable-only-full-group-by/31058962#31058962)

In my case this query is : set @@sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

After this, the sql query in the code runs fine.

(... I added ONLY_FULL_GROUP_BY back to the mode after I had finished watching the video in order to remain compliant with the latest standards)