I am running the next query in Hive:
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 < count_q_cid;
I keep getting the error like
ParseException line 1:103 mismatched input ',' expecting ) near 'a' in subquery source
What is the problem with the code? I can't see any.