create table db.temp
location '/user/temp' as
SELECT t1.mobile_no
FROM db.temp t1
WHERE NOT EXISTS ( SELECT NULL
FROM db.temp t2
WHERE t1.mobile_no = t2.mobile_no
AND t1.cell != t2.cell
AND t2.access_time BETWEEN t1.access_time
AND t1.access_time_5);
I need to get all the users who used the same cell for 5 hours of the time interval(access_time_5) from access time. This code perfectly fine with impala. But not works in Hive.
Gives an error
"Error while compiling statement: FAILED: SemanticException [Error 10249]: line 23:25 Unsupported SubQuery Expression"
I looked at a similar question related to this error. Can't figure out the solution. Any help would be highly appreciated!