Hi all,
I have a requirement to check in one query, the count of null and not-null rows in a table.
I am using Oracle 12C and below is a sample of the data:
CREATE TABLE TEST(E2B_ID NUMBER);
INSERT ALL
INTO TEST VALUES(1)
INTO TEST VALUES(2)
INTO TEST VALUES(NULL)
INTO TEST VALUES(NULL)
INTO TEST VALUES(3)
INTO TEST VALUES(4)
SELECT * FROM DUAL;
Expected O/P is:
COUNT(NULL ROWS) | COUNT(NOTNULL ROWS)
2 4
Is there a way to get the data in 1 query i.e. I want 2 columns as the resultant query. Both with null and not null rows count,