SQL query subquery in WHERE environment

I have two tables with similar fields, but the query fails when I execute a subquery SELECT

in a sentence WHERE

.

SELECT foo 
FROM   bar
WHERE  fizz IN (SELECT fizz FROM fuzz)

      

I removed error.log

from AWS but the error was something like HIVE didn't recognize SELECT

.

How can I change the structure of the request?

Thank.

+3


source to share


3 answers


In the subqueries of the WHERE clause of the HIVE Language Guide :



SELECT b.foo FROM bar b WHERE b.fizz IN (SELECT f.fizz FROM fuzz f)

      

+4


source


Hives have problems with subquery in WHERE clause use JOIN



SELECT foo FROM bar 
JOIN fuzz
ON bar.fizz=fuzz.fizz

      

0


source


Hive does not support IN, EXISTS, or subqueries in the WHERE clause. Go for crossover ...

0


source







All Articles