sql count null columns in a row code example
Example: sql count null values in all columns
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 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;