I have a query that returns a set of counts: all rows, all rows where destination zip is not null, and the difference between the two, which would be count of all rows where destination zip is null.
SELECT
COUNT(*) AS TOTAL_ITEMS,
COUNT(DESTZIP) TOTAL_WITH_ZIP,
COUNT(*) - COUNT(DESTZIP) TOTAL_NO_DESTZIP
FROM MYTABLE
WHERE LASTMODIFIEDON between TO_TIMESTAMP('06/04/2024','mm/dd/yyyy') and TO_TIMESTAMP('06/05/2024','mm/dd/yyyy');
Here COUNT(DESTZIP) returns count of rows where DESTZIP is not null.
I need to modify this to exclude all rows where DESTZIP = ‘00000’ in addition to not being null and am stumped.
I guess, by extension, TOTAL_NO_DESTZIP would also be affected.