Task: Text to Code
Input (English): Step 1: For each row in Physician table, find the corresponding rows in Department table.
Step 2: find Physician's Name of the results of step 1 whose Department's Name equals Surgery.
Step 3: find Physician's Name of the results of step 1 whose Department's Name equals Psychiatry.
Step 4: show the rows that are in both the results of step 2 and the results of step 3
Output (English): SELECT T1.Name FROM Physician AS T1 JOIN Department AS T2 ON T1.EmployeeID = T2.Head WHERE T2.Name = "Surgery" INTERSECT SELECT T1.Name FROM Physician AS T1 JOIN Department AS T2 ON T1.EmployeeID = T2.Head WHERE T2.Name = "Psychiatry"