title: Write a nested select statement with a where clause in Hive
body: <p>I have a requirement to do a nested select within a where clause in a Hive query. A sample code snippet would be as follows; </p>
  
  <p>select * <br/>
  from TableA <br/>
  where TA_timestamp > (select timestmp from TableB where id="hourDim") </p>
  
  <p>Is this possible or am I doing something wrong here, because I am getting an error while running the above script ?!</p>
  
  <p>To further elaborate on what I am trying to do, there is a cassandra keyspace that I publish statistics with a timestamp. Periodically (hourly for example) this stats will be summarized using hive, once summarized that data will be stored separately with the corresponding hour. So when the query runs for the second time (and consecutive runs) the query should only run on the new data (i.e. - timestamp > previous_execution_timestamp). I am trying to do that by storing the latest executed timestamp in a separate hive table, and then use that value to filter out the raw stats.</p>
  
  <p>Can this be achieved this using hive ?!</p>