Reputation: 21
Can we join two tables with where clause in hive? In SQL I tried and its working, but in hive it's not working as hive doesn't support subqueries in where clause
select t.name,t2.addr from trail t
join trail2 t2
on t.name=t2.name
where marks > (select marks from trail where name='sa) ;
Upvotes: 2
Views: 1121
Reputation: 4957
Query will not work.
Hive 0.13 supports only IN/NOT IN or EXISTS/NOT EXISTS in where clause
Upvotes: 1