How many friends does Dan have?
CREATE TABLE PersonFriend (friend VARCHAR, name VARCHAR); CREATE TABLE Person (name VARCHAR)
SELECT COUNT(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE PersonFriend (friend VARCHAR, name VARCHAR); CREATE TABLE Person (name VARCHAR) Question: How many friends does Dan have? [/INST] SELECT COUNT(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan' </s>