What are the ids and names of the companies that operated more than one flight?
create table flight (id varchar, PRIMARY KEY (id)); create table operate_company (id varchar, name varchar, PRIMARY KEY (id))
select t1.id, t1.name from operate_company as t1 join flight as t2 on t1.id = t2.company_id group by t1.id having count(*) > 1