darkownage
darkownage

Reputation: 938

Presto group by distinct values in hive array

In hive you can group on distinct values in an Hive array like this:

SELECT i, count(distinct cookieID) as unique_visitor, count(*) as impressions FROM table LATERAL VIEW explode(interests) interestTable AS i GROUP BY i;

How can you achieve the same in Presto?

Doesn't have to be with a group by, just the same result (and hopefully faster) than in Hive is fine.

Cheers

Upvotes: 1

Views: 2753

Answers (1)

David Phillips
David Phillips

Reputation: 10208

This is not supported yet, but it is on the roadmap.

Upvotes: 1

Related Questions