You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/01/17 17:58:38 UTC
[GitHub] [superset] betodealmeida commented on issue #18065: Disable Strict Mode in SQL Lab
betodealmeida commented on issue #18065:
URL: https://github.com/apache/superset/issues/18065#issuecomment-1014781504
This is an issue with MySQL, not Superset. You can disable `ONLY_FULL_GROUP_BY` by doing something like [this](https://stackoverflow.com/a/37508414/807118):
```sql
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:
```sql
SELECT
COUNT(*), -- aggregation
country, -- non-aggregation, should be in the group by
gender -- non-aggregation, should be in the group by
FROM my_table
GROUP BY
country; -- missing "gender"
```
After:
```sql
SELECT
COUNT(*),
country,
gender
FROM my_table
GROUP BY
country,
gender; -- ADDED "gender"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org