Question: List the name of a building along with the name of a company whose office is in the building.
Schema: create table buildings (name varchar, id varchar, PRIMARY KEY (name)); create table office_locations (building_id varchar, company_id varchar, PRIMARY KEY (building_id)); create table companies (name varchar, id varchar, PRIMARY KEY (name))
SQL: select t3.name, t2.name from office_locations as t1 join buildings as t2 on t1.building_id = t2.id join companies as t3 on t1.company_id = t3.id