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
Post a Comment