List the names of departments where some physicians are primarily affiliated with.
CREATE TABLE affiliated_with (department VARCHAR); CREATE TABLE department (name VARCHAR, departmentid VARCHAR)
SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE affiliated_with (department VARCHAR); CREATE TABLE department (name VARCHAR, departmentid VARCHAR) Question: List the names of departments where some physicians are primarily affiliated with. [/INST] SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1 </s>