Find the number of projects which each scientist is working on and scientist's name.
CREATE TABLE scientists (name VARCHAR, ssn VARCHAR); CREATE TABLE assignedto (scientist VARCHAR)
SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE scientists (name VARCHAR, ssn VARCHAR); CREATE TABLE assignedto (scientist VARCHAR) Question: Find the number of projects which each scientist is working on and scientist's name. [/INST] SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name </s>