Task: Text to Code
Input (English): Step 1: For each row in Addresses table, find corresponding rows in Staff table and in Customers table.
Step 2: find Customers's last_name of the results of step 1 whose Staff's last_name equals Sawayn.
Step 3: find Customers's last_name of the results of step 1 whose Staff's last_name equals Sawayn.
Step 4: show the rows that are in both the results of step 2 and the results of step 3
Output (English): SELECT T3.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T2.staff_address_id = T1.address_id JOIN Customers AS T3 ON T1.address_id = T3.customer_address_id WHERE T2.last_name = "Sawayn" INTERSECT SELECT T3.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T2.staff_address_id = T1.address_id JOIN Customers AS T3 ON T1.address_id = T3.customer_address_id WHERE T2.last_name = "Sawayn"