Question: How many restaurant is the Sandwich type restaurant?
Schema: create table type_of_restaurant (id varchar, PRIMARY KEY (id)); create table restaurant (id varchar, PRIMARY KEY (id)); create table restaurant_type (id varchar, PRIMARY KEY (id))
SQL: select count(*) from restaurant join type_of_restaurant on restaurant.resid = type_of_restaurant.resid join restaurant_type on type_of_restaurant.restypeid = restaurant_type.restypeid group by type_of_restaurant.restypeid having restaurant_type.restypename = 'sandwich'