左半连接left demi-join
作者:互联网
返回左边表的记录,前提是其记录对于右边表满足on语句的判定条件
对于左表中一条指定的记录,在右表中一旦找到匹配的记录,hive就会立即停止扫描
1.sql
select s.myd,s,symbol,s.price_close from stocks s
where s.ymd,s.symbol in
(select d.ymd,d,symbol from dividends d);
2,hive
select s.myd,s,symbol,s.price_close from stocks s
left semi join
dividens d
on s.ymd=d.ymd and s.symbol=d.symbol
标签:join,记录,symbol,demi,ymd,close,左半,price,select 来源: https://www.cnblogs.com/hapyygril/p/11109346.html