title: ParseException - mismatched input in subquery source - error in Hive
body: <p>I am running the next query in Hive:</p>
  
  <pre><code>SELECT COUNT(*) 
  FROM 
    (
     SELECT * 
     FROM 
     (SELECT id, COUNT(*) AS count_p_id FROM palladion GROUP BY id) a, 
     (SELECT cid, COUNT(*) AS count_q_cid FROM operations GROUP BY cid) b 
     WHERE a.id=b.cid
    ) 
  WHERE count_p_id &lt; count_q_cid;
  </code></pre>
  
  <p>I keep getting the error like</p>
  
  <pre><code> ParseException line 1:103 mismatched input ',' expecting ) near 'a' in subquery source
  </code></pre>
  
  <p>What is the problem with the code? I can't see any.</p>