/*Writing an aggregated column Assuming the column/field name is 'col'*/ SUM(CASE WHEN col IS NULL THEN 1 ELSE 0 END) count_nulls /*OR*/ COUNT(*)-COUNT(col) count_nulls