Skip to content

Tag: amazon-redshift

Count NULL values by column in SQL

Suppose I have the following table: How can I count the number of NULL values by each column? My final result would be: Answer You can use union all: Redshift is a column-store database, so there probably is not a more efficient method.