ThChatz commented on issue #29616:
URL: https://github.com/apache/superset/issues/29616#issuecomment-2234083525

   Probably has to do with only_full_group_by but still the issue is visible 
with default datasets:
   create a calculated column on the `main.channel` dataset with the query
   `(SELECT name FROM channels WHERE channels.id=channel_id)`
   Create a table with that column as the dimension and the default count metric
   
   the query you get is:
   `SELECT
     (SELECT name
      FROM channels
      WHERE channels.id=channel_id) AS test,
          COUNT(*) AS count
   FROM main.channel_members
   GROUP BY
     (SELECT name
      FROM channels
      WHERE channels.id=channel_id)
   ORDER BY count DESC
   LIMIT 1000
   OFFSET 0;`
   
   while a more compatible query would be
   `SELECT
     (SELECT name
      FROM channels
      WHERE channels.id=channel_id) AS test,
          COUNT(*) AS count
   FROM main.channel_members
   GROUP BY test
   ORDER BY count DESC
   LIMIT 1000
   OFFSET 0;`
   


-- 
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