I am trying to run multiple sub queries into a where clause, and I get the error below. Does mean that Hive doesn't support it? If not, is there a different way to write the query below?
If i wrote code like this:
SELECT *
FROM ide_test.flights
WHERE carrier_code IN
(
SELECT carrier_code
FROM ide_test.flights
WHERE year >1
);
I will get
[Error 10249]: Line 6:12 Unsupported SubQuery Expression 'carrier_code': SubQuery cannot use the table alias: flights; this is also an alias in the Outer Query and SubQuery contains a unqualified column reference
If i wrote like this,add an "s" besides the subquery or outer query table's name:
SELECT *
FROM ide_test.flights
WHERE carrier_code IN
(
SELECT carrier_code
FROM ide_test.flights s
WHERE year >1
);
or
SELECT *
FROM ide_test.flights s
WHERE carrier_code IN
(
SELECT carrier_code
FROM ide_test.flights
WHERE year >1
);
Then it worked