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 2022/06/24 04:31:07 UTC

[GitHub] [druid] suneet-s commented on issue #12699: QUANTILE FUNCTIONS DOES NOT WORK?

suneet-s commented on issue #12699:
URL: https://github.com/apache/druid/issues/12699#issuecomment-1165183602

   @NikitaElmanov you can get percentiles by using the `APPROX_QUANTILES_DS` function in sql. See https://druid.apache.org/docs/latest/querying/sql-aggregations.html#quantiles-sketch-functions for the list of aggregations. I think your query would look like
   
   ```
   SELECT
     __time as "time",
   APPROX_QUANTILES_DS(sla, 0.99) as " ", --!!!!!!!!!!!!!!!!!!!!!!!!!!
     name as "service"
   FROM SYTESTER_DRUID
   WHERE ('${service}' = 'Show All' OR name in (${service:sqlstring}))
   AND __time >= MILLIS_TO_TIMESTAMP(${__from}) AND __time <= MILLIS_TO_TIMESTAMP(${__to})
   GROUP BY __time, name
   ```


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org