Question: Show names of companies and that of employees in descending order of number of years working for that employee.
Schema: create table people (name varchar, people_id varchar, PRIMARY KEY (name)); create table company (name varchar, company_id varchar, PRIMARY KEY (name)); create table employment (people_id varchar, company_id varchar, year_working varchar, PRIMARY KEY (people_id))
SQL: select t3.name, t2.name from employment as t1 join people as t2 on t1.people_id = t2.people_id join company as t3 on t1.company_id = t3.company_id order by t1.year_working