Count NULL Values from multiple columns with SQL -
i have 3 columns let a, b, , c. need count null values in each column.
for example:
| b | c ------------- 1 |null| 1 1 | 1 | null null| 1 | 1 null|null| 1
should output:
| b | c --------------- 2 | 2 | 1
i've tried count, sum, sub-queries nothing has worked me yet. input appreciated!
select count(*)-count(a) a, count(*)-count(b) b, count(*)-count(c) c yourtable;
Comments
Post a Comment