i have written this SQL ... please see if its what you want ..
if you want to learn how to write SQL that's something else
' my SQL Output '
, Count(DogName) as NumberOfDogs
, sum(case when Vaccine = 'Yes' then 1 else 0 end ) as DogsWithVaccine
, sum(case when Vaccine = 'No' then 1 else 0 end ) as DogsWithoutVaccine
declare @Starting_Data table (Ownername varchar(200), Dogname varchar(200) , Vaccine varchar(200) )
insert into @Starting_Data Values