Druid Docs Example Query

34 views
Skip to first unread message

Diganta Mukherjee

unread,
Oct 20, 2020, 5:54:06 AM10/20/20
to Druid User
Hi All,

I am going through the Druid docs and found the following query given in the example might not give proper results 
SELECT SUM("cnt") / COUNT(*) * 1.0 FROM datasource;

If we however modify this query as below to enable type conversion to floating point, we can get proper value of rollup ratio. 

SELECT SUM("cnt") / (COUNT(*) * 1.0) FROM datasource;

Probably this could be rectified in the docs.

Thanks,

Diganta

Vaibhav Vaibhav

unread,
Oct 20, 2020, 6:34:13 AM10/20/20
to druid...@googlegroups.com
Hi Diganta,

Thank you for the input. You can use the `EDIT`  option in the doc to propose this change -

image.png

Thanks and Regards,
Vaibhav

--
You received this message because you are subscribed to the Google Groups "Druid User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-user/936b17da-f6f1-4241-861b-c7ba5d86e773n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages