How many types of restaurant have the name "Sandwich"?
select count(*) from restaurant_type where restypename = "Sandwich"
What are the names of restaurants with the type "Sandwich"?
select restaurant.resname 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'
Give the count of that.
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'