How many dogs have not gone through any treatment?
create table dogs (dog_id varchar, PRIMARY KEY (dog_id)); create table treatments (dog_id varchar, PRIMARY KEY (dog_id))
select count(*) from dogs where not dog_id in (select dog_id from treatments)