Find the number of dog pets that are raised by female students (with sex F).
create table has_pet (stuid varchar, petid varchar, PRIMARY KEY (stuid)); create table pets (petid varchar, pettype varchar, PRIMARY KEY (petid)); create table student (stuid varchar, sex varchar, PRIMARY KEY (stuid))
select count(*) from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t2.petid = t3.petid where t1.sex = 'f' and t3.pettype = 'dog'