CREATE TABLE flight (flno NUMBER, origin CLOB, destination CLOB, distance NUMBER, departure_date TIME, arrival_date TIME, price NUMBER, aid NUMBER)
CREATE TABLE aircraft (aid NUMBER, name CLOB, distance NUMBER)
CREATE TABLE certificate (eid NUMBER, aid NUMBER)
CREATE TABLE employee (eid NUMBER, name CLOB, salary NUMBER)

What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300?
SELECT T1.name FROM employee AS T1 JOIN certificate AS T2 ON T1.eid = T2.eid JOIN aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800" INTERSECT SELECT T1.name FROM employee AS T1 JOIN certificate AS T2 ON T1.eid = T2.eid JOIN aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Airbus A340-300"
SELECT "T1"."name" FROM "employee" "T1" JOIN "certificate" "T2" ON "T1"."eid" = "T2"."eid" JOIN "aircraft" "T3" ON "Boeing 737-800" = "T3"."name" AND "T2"."aid" = "T3"."aid" INTERSECT SELECT "T1"."name" FROM "employee" "T1" JOIN "certificate" "T2" ON "T1"."eid" = "T2"."eid" JOIN "aircraft" "T3" ON "Airbus A340-300" = "T3"."name" AND "T2"."aid" = "T3"."aid"