CREATE TABLE physician (name VARCHAR2, EmployeeID VARCHAR2)
CREATE TABLE affiliated_with (physician VARCHAR2, department VARCHAR2, PrimaryAffiliation VARCHAR2)
CREATE TABLE department (name VARCHAR2, DepartmentID VARCHAR2)

Find the names of all physicians and their primary affiliated departments' names.
SELECT T1.name, T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1
SELECT "T1"."name", "T3"."name" FROM "physician" "T1" JOIN "affiliated_with" "T2" ON "T1"."EmployeeID" = "T2"."physician" AND "T2"."PrimaryAffiliation" = 1 JOIN "department" "T3" ON "T2"."department" = "T3"."DepartmentID"