Professional Documents
Culture Documents
To make sure you can take some of the remaining lectures of the course without
unnecessary interruption, we strongly advise you to execute the following query
now.
If you�re interested in the reason we are asking you to do this, you can read the
technical description below. Please be aware that it may sound a bit too abstract
at this stage. However, you can always refer back to it once you have completed the
lectures about the different types of SQL variables found in the Advanced SQL Tools
section of the course.
Technical description:
The GROUP BY clause will be used in several queries by the end of the course.
Different versions of the SQL language and MySQL, in particular, can set different
limits on how the GROUP BY clause can be applied.
In some of the lectures in the JOINs section, we have opted for queries where
multiple table columns that are not included in the GROUP BY clause will be listed
in the SELECT statement. We have decided this is the correct approach to teaching
the use of the GROUP BY clause at this stage. At the same time, we are aware some
versions of MySQL may not allow such queries, or at least not by default.
In order to view the current value of this variable in your case, you have to
execute the following command.
select @@global.sql_mode;
REPLACE() is the function that will remove the �only_full_group_by� value from the
expression here. Thus, error 1055 will not show up in the future.
Finally, if for some reason you�d like to disallow this behavior you can always
execute the following command which will do exactly the opposite: it will add the
�only_full_group_by� value to the expression.