title: getting max value of a timestamp column as subquery in hive
body: <p>I have a timestamp columns with name <code>start_dt</code> and <code>end_dt</code>  in my hive table1 and the table will always have only one record. </p>
  
  <p>In table2 I have a date column called <code>load_dt</code>. </p>
  
  <p>I am trying to achieve something like this:</p>
  
  <pre><code>select * from table2 where load_dt between (select cast(max(start_dt) to date) from table1) and (select cast(max(end_dt) to date) from table1)
  </code></pre>
  
  <p>However the above query is failing.
  what would be correct query to achieve the same.</p>