You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/11/21 09:00:41 UTC

[GitHub] zhaojiandong opened a new issue #6651: Case when cannot work on nested sql

zhaojiandong opened a new issue #6651: Case when cannot work on nested sql
URL: https://github.com/apache/incubator-druid/issues/6651
 
 
   My SQL is as follows, I use case..when in outer sql, but  cannot get "value"
   ```
   SELECT 
   t, 
   sum(CASE host WHEN 'druid-host1' then value ELSE 1 END) as "tps_host1",
   sum(CASE host WHEN 'druid-host2' then value ELSE 1 END) as "tps_host2"
   FROM(
   SELECT
       TIME_FLOOR(__time, 'PT1M') as t,
       host,
       sum(sum_value) as value
   FROM druid_metric_default
   WHERE "__time" >= '2018-11-21 16:30:00+0800'
   AND metric='ingest/events/processed'
   GROUP BY TIME_FLOOR(__time, 'PT1M'),host
   )
   GROUP by t
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org