I have a table that has a processed_timestamp column -- if a record has been processed then that field contains the datetime it was processed, otherwise it is null.
processed_timestamp
Oracle:
group by nvl2(field, 'NOT NULL', 'NULL')