我怎么在Hive里写这个?此表有重复项,基于第一个唯一列,我想从新表中排除重复记录。
data new; set old; by Col_1 Col_2date Col_3date; if Col_2date ^= Col_3date then do; if first.Col_3Date ^= 1 then delete; end; run;
qjp7pelc1#
以下内容如何:
select min(Obs) as Obs, Col_11, Col_2date, Col_3date from your_table group by Col_11, Col_2date, Col_3date
1条答案
按热度按时间qjp7pelc1#
以下内容如何: