Context: CREATE TABLE Maintenance_Contracts (maintenance_contract_company_id VARCHAR); CREATE TABLE Maintenance_Engineers (company_id VARCHAR); CREATE TABLE Third_Party_Companies (company_id VARCHAR, company_name VARCHAR)
Question: Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.
Answer: SELECT T1.company_id, T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Engineers AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id HAVING COUNT(*) >= 2 UNION SELECT T3.company_id, T3.company_name FROM Third_Party_Companies AS T3 JOIN Maintenance_Contracts AS T4 ON T3.company_id = T4.maintenance_contract_company_id GROUP BY T3.company_id HAVING COUNT(*) >= 2