How many restaurant is the Sandwich type restaurant?
CREATE TABLE Type_Of_Restaurant (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR); CREATE TABLE Restaurant_Type (Id VARCHAR)
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'
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE Type_Of_Restaurant (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR); CREATE TABLE Restaurant_Type (Id VARCHAR) Question: How many restaurant is the Sandwich type restaurant? [/INST] 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' </s>