What's wrong with this query (running in hive):
SELECT count(*) TotalCount, b.region_code from XXX a INNER JOIN YYY b ON a.uid=b.uid where a.dt = '2015-04-15' group by b.region_code order by b.region_code I think it should be pretty straightforward, but am getting this:
FAILED: SemanticException [Error 10004]: Line 6:32 Invalid table alias or column reference 'b': (possible column names are: _col0, _col1) Here is the YYY table:
hive> desc YYY; OK status_code int uid string zip_code string keyword string region_code bigint dt timestamp channel int and XXX table:
hive> desc XXX; OK group_key string category string uid string dt timestamp