What's wrong with this Query?


#1

I'm trying to test my code out:

SELECT * FROM Airports
LIMIT 5;
SELECT * FROM Flights
LIMIT 5;

//Shows me the table for reference

SELECT * FROM flights
WHERE origin IN (
SELECT * FROM airports WHERE
elevation > 2000);

//Select the flights that corresponds to the airport with an elevation of over 2000 feet. I'm just trying to test my query out.

Error: near line 6: only a single result allowed for a SELECT that is part of an expression

Thanks in advance


#2

@javacoder44363,
Although we are using SQLite you could refer to Oracle's SQL
https://docs.oracle.com/cd/B19306_01/server.102/b14200/conditions013.htm
or
https://asktom.oracle.com/pls/apex/f?p=100:11:0::NO::P11_QUESTION_ID:442029737684

To get an idear of the build of the table's you are using in the exercise
you could use a
+++ show all table defintions
select * from sqlite_master;


#3