How many times has the student Linda Smith visited Subway?
create table visits_restaurant (id varchar, PRIMARY KEY (id)); create table student (id varchar, PRIMARY KEY (id)); create table restaurant (id varchar, PRIMARY KEY (id))
select count(*) from student join visits_restaurant on student.stuid = visits_restaurant.stuid join restaurant on visits_restaurant.resid = restaurant.resid where student.fname = "linda" and student.lname = "smith" and restaurant.resname = "subway"