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

What are the flight numbers for the aircraft Airbus A340-300?
SELECT T1.flno FROM flight AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = "Airbus A340-300"
SELECT "T1"."flno" FROM "flight" AS "T1" JOIN "aircraft" AS "T2" ON "Airbus A340-300" = "T2"."name" AND "T1"."aid" = "T2"."aid"