What are the names of departments that have primarily affiliated physicians.
SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation  =  1
departments that have primarily affiliated physicians refers to filtering on PrimaryAffiliation = 1; names of departments refers to SELECT DISTINCT department.name; joining tables to relate departments with affiliations.