- 查看两个表相同的记录数
select count(*) from db1.tb1 A inner join db2.tb2 B on (A.account = B.mobile);
等价于
select count(*) from db1.tb1 A, db2.tb2 B where A.account = B.mobile;
- 查看非空记录
select count(*) from db1.tb1 where mobile != ''
select count(*) from db1.tb1 A inner join db2.tb2 B on (A.account = B.mobile);
等价于
select count(*) from db1.tb1 A, db2.tb2 B where A.account = B.mobile;
select count(*) from db1.tb1 where mobile != ''
本文标题:Hive sql常用语句
本文链接:https://www.haomeiwen.com/subject/rpkekxtx.html
网友评论