Cómo contar los valores nulos en SQL
SELECT COUNT(1) FROM my_table WHERE my_column IS NULL;
VasteMonde
SELECT COUNT(1) FROM my_table WHERE my_column IS NULL;
SELECT sum(CASE WHEN column_A IS NULL THEN 1 ELSE 0 END) A,
sum(CASE WHEN column_B IS NULL THEN 1 ELSE 0 END) B
FROM my_table;
select sum(case when a is null then 1 else 0 end) count_nulls
, count(a) count_not_nulls
from us;