How to use data from outer query in the inner query or subquery in hive?I am trying to use ndo.FromDate and ndo.ToDate in the second JOIN but that would not work
LEFT JOIN
Temp.NumberOfDaysOnline ndo
ON
ndo.sku = nr.sku
JOIN
gadb.gasessiondata gasessiondata
ON
1=1
LEFT JOIN
(
SELECT SUM(gasessiondata.sessions) As visitsOnDaysSKUWasLive
FROM
gadb.gasessiondata gasessiondata
WHERE
gasessiondata.date >= ndo.FromDate
AND
gasessiondata.date < ndo.ToDate
) AS visits