Question: How many times has the student Linda Smith visited Subway?
Schema: 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))
SQL: 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"