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 >> aggregations over multiple columns?


Copy link to this message
-
Re: aggregations over multiple columns?
Mike,

  This is a valid query, group by over multiple columns works in hive.

-- amr

Michael E. Driscoll wrote:
> Hi HIVErs,
>
> I'm trying to perform the following aggregation query in HIVE, which
> finds the largest purchase for all combinations of customer and store:
>
>   SELECT customer, store, max(purchasePrice)
>   FROM transactions
>   GROUP BY customer, store
>
> If aggregation over multiple columns is not currently supported, how
> might I reformulate this to work in HIVE, possibly via a simpler
> series of queries?
>
> (I will post the exact error and reproducible code if it turns out
> this query is valid).
>
> regards,
>
> Mike
>
> b: www.dataspora.com/blog
> t: www.twitter.com/dataspora
>
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