title: HIVE QUERY SELECT * FROM bookfreq where freq IN (SELECT Max(freq) FROM bookfreq);
body: <p>I am writing hive query,for fetching record has maximum freq value.</p>
  
  <pre><code>table name bookfreq, having two column year &amp; freq
  
  year freq
  
  1999  2
  
  2000  4
  
  1989  4
  
  1990  5
  </code></pre>
  
  <p>Query:</p>
  
  <pre><code>SELECT * FROM bookfreq where freq IN (SELECT Max(freq) FROM bookfreq);
  </code></pre>
  
  <p>I am getting an exception like</p>
  
  <pre><code>FAILED: ParseException line 1:38 cannot recognize input near 'SELECT' 'Max' '(' in expression specification
  </code></pre>