i have a table (stacked) with variables cipcode, awlevel, unitid, and year.
im trying to generate a report that will tell me the distinct count of unitid where awlevel=5 and cipcode=45.0601 in 2001 but not 2011. Basically i need results where cipcode only exists when year=2001 and doesnt exist when year=2011.
so far i have this, which gives me the results for 2001 only
select count(distinct(unitid)) as Grad11 label="Schools with Graduations",
where awlevel=5 and cipcode='45.0601' and year=2001;
I think the answer involves nested selects but i cant wrap my head around it.