Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> hive sql error: Invalid Table Alias or Column Reference


Copy link to this message
-
hive sql error: Invalid Table Alias or Column Reference
I have a simple query like this (identify hosts that have more than one
request):

select host, count(1) as cnt from accesslogs where cnt>1 group by host;

and it throws the error Invalid Table Alias or Column Reference cnt.

Is using column alias like this unsupported? Is there another way of
achieving the same query as above?
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB