Home | About | Sematext search-lucene.com search-hadoop.com
 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?

  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