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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to