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 to share