①
select * from A t1
where t1.data_dt = (select max(data_dt) from B)
②
select * from A t1
where t1.data_dt in (select max(data_dt) from B)
在 Hive 中,子查询可以返回单个值或一组值。
select * from A t1
where t1.data_dt = (select max(data_dt) from B limit 1) //limit 1
drop table if exists 表名(dmp_sdm_develop.tmp_exchange);