This is my first time handling a snowflake table, but I have a difficulty selecting empty values in my SQL query.
This is an example table:
I am selecting count of customers whom registrations is NOT TRUE. I used this query:
SELECT count(*) FROM CUSTOMERS WHERE Registered != 'TRUE'
I got only two customers because of empty (NULL) values, then I tried another query with NULLIF
to include nulls:
SELECT count(NULLIF(Registered,'')) AS TEST FROM CUSTOMERS WHERE Registered != 'TRUE'
This also did not include the empty values in the total count!
CodePudding user response: