CREATE TABLE routes (rid VARCHAR, dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR)
CREATE TABLE airports (rid VARCHAR, dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR)

Find the id of routes whose source and destination airports are in the United States.
SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')
SELECT "rid" FROM "routes" WHERE "dst_apid" IN (SELECT "apid" FROM "airports" WHERE "country" = 'United States') AND "src_apid" IN (SELECT "apid" FROM "airports" WHERE "country" = 'United States')