Addresses WHERE city = 'New York' ) SELECT p.first_name, p.last_name, a.street, a.city FROM People p INNER JOIN Address_CTE a ON p.person_id = a.person_id;
SELECT pep.first_name, adr1.birth_date, adr2.birth_date FROM People pep INNER JOIN ADR adr1 ON pep.person_id = adr1.person_id INNER JOIN ADR adr2 ON pep.birth_date = adr2.birth_date WHERE pep.person_id = 135233;
birth_date FROM Addresses WHERE person_id = 135233; SELECT pep.first_name, FROM People pep INNER JOIN temp_addresses adr1 ON pep.person_id = adr1.person_id INNER JOIN temp_addresses adr2 ON pep.birth_date = adr2.birth_date ORDER BY adr1_address_id, adr2_address_id;