You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue with MySQL, not Superset. You can disable ONLY_FULL_GROUP_BY by doing something like this:
SET sql_mode=(SELECT REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', ''));
Alternatively, you can fix your SQL to ensure that all non-aggregated columns are listed in the GROUP BY.
Before:
SELECTCOUNT(*), -- aggregation
country, -- non-aggregation, should be in the group by
gender -- non-aggregation, should be in the group byFROM my_table
GROUP BY
country; -- missing "gender"
After:
SELECTCOUNT(*),
country,
gender
FROM my_table
GROUP BY
country,
gender; -- ADDED "gender"
Whenever I use GROUP BY in SQL Lab, I am getting an error stating
MySQL Error
mysql error: Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggregated column
How to disable the strict mode?
The text was updated successfully, but these errors were encountered: