I'm trying to do a count on the number of combinations of country/state codes that are invalid (in Australia) for driving licences.
The output is okay...for example I get these results:
select COUNTRY_CODE, STATE_CODE, count(*) from
(select COUNTRY_CODE, STATE_CODE from CUSTOMER_TABLE
where DRIVING_LICENCE is not null
and not (COUNTRY_CODE in ('AUST') AND STATE_CODE in ('VIC', 'NSW', 'SA', 'QLD', 'NT', 'TAS', 'WA', 'ACT')))
group by COUNTRY_CODE, STATE_CODE
However, what I am missing is the combination of "AUST" & <null> for country/state respectively.
Am I writing the code correctly?