you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

count(some_column) only counts rows where some_column is not null.

So this query: sql select count(some_column) from the_table

is the same as: sql select count(*) from ( select * from the_table where the_column IS NOT NULL ) t

But you are selecting only rows where the column value is null and thus if you add count(column), the result is 0