1.Query (1)分区查询 在查询的过程中,采用那个分区来查询是通过系统自动的决定,但是必须是在分区列上基于where子查询. SELECT page_views.* FROM page_views WHERE page_views.date >= '2008-03-01' AND page_views.date <= '2008-03-31' AND page_views.referrer_url like '%xyz.com'; (2).join 从集合的角度上来理解 在m
1.insert Insert时,from子句既能够放在select子句后,也能够放在insert子句前,以下两句是等价的 hive> FROM invites a INSERT OVERWRITE TABLE eventsSELECT a.bar, count(*) WHERE a.foo > 0 GROUP BY a.bar; hive> INSERT OVERWRITE TABLE events SELECTa.bar, count(*) FROM invites a WHERE
转自:http://www.aboutyun.com/thread-7327-1-1.html 1.Hive不支持等值连接 SQL中对两表内联可以写成:select * from dual a,dual b where a.key = b.key; Hive中应为:select * from dual a join dual b on a.key = b.key; 而不是传统的格式:SELECT t1.a1 as c1, t2.b1 as c2FROM t1, t2 WHERE t