How do I write this in HIVE? This table has duplicates and based on the first unique column I want to exclude the duplicate records from the new table.
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;