srikalyc / Sql4D

Sql interface to druid.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to achieve the count(distinct ) function in SQL

chenzhaohangbj12 opened this issue · comments

I would like to use the "count(distinct )" query, but not found in the wiki,Slq4d Whether or not support this function?
thank you~

See posts in this blog http://druidwithsql.tumblr.com/ . Search for UNIQUE

Why the result is “11.029647221949576”
Maybe “11” is what I want.

Thats because of approximation algorithm druid uses. You can trim it to integral value on client side.

thank you!