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 2019/07/12 10:55:17 UTC

[GitHub] [incubator-superset] villebro commented on issue #7851: Writing a CASE statement in Custom SQL Lab with Filter Box

villebro commented on issue #7851: Writing a CASE statement in Custom SQL Lab with Filter Box
URL: https://github.com/apache/incubator-superset/issues/7851#issuecomment-510843897
 
 
   @mukund14 the Custom SQL in a metric should only correspond to one aggregation function, not the entire query. I suspect the following should work in your use case:
   ```sql
   AVG(CASE WHEN l1_bacteria_name IN ('Firmicutes', 'Bacteroidetes') THEN value ELSE NULL END)
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org