Monday, May 20, 2013

Hive - join

@Join

SELECT a.uu_id, a.time as registerTime, a.activity as register, b.activity as buy
FROM (select * from tableA where dt="2013-05-17" and activity="register") a
JOIN (select * from tableB where dt="2013-05-17" and activity="buy") b
ON(a.uu_id = b.uu_id) limit 10;
view raw JoinHive.sql hosted with ❤ by GitHub

No comments:

Post a Comment