Druid Docs Example Query

Hi All,

I am going through the Druid docs and found the following query given in the example might not give proper results
https://druid.apache.org/docs/latest/ingestion/index.html#maximizing-rollup-ratio

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

Hi Diganta,

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

image.jpg

Thanks and Regards,
Vaibhav