Howdy,
today I had the challenge to count null values in a orale table. At first I tried something like
SELECT sum(field1 is null) null_counter FROM table
but this did not bring be very far.
also:
SELECT sum( case field1 when null then 1 else 0 end ) null_counter FROM table
did not get me very far.
After some internet research I came across this neat little thingie:
SELECT sum( case nvl(field1,'null') when 'null' then 1 else 0 end ) null_counter FROM table