I have a table
create table us ( a number );
Now I have data like:
a 1 2 3 4 null null null 8 9
Now I need
This works for Oracle and SQL Server (you might be able to get it to work on another RDBMS):
select sum(case when a is null then 1 else 0 end) count_nulls , count(a) count_not_nulls from us;
Or:
select count(*) - count(a), count(a) from us;