sql - Why "SELECT COUNT(DISTINCT <Column>) FROM <Table>" return 0? -


i have run query above columns in massive table (billion rows) , fine except couple returning 0. how possible?

count(distinct) can return 0 under 2 circumstances. first values column/expression evaluate null. second where clause (or join) filters out rows.

if have no where or join, values null <columnb>.


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

ruby on rails - one-to-many through referance table -

java - How to execute tasks in ExecutorService sequentially? -