Reputation: 938
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