Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table, I am trying to drop duplicates if they apply to two specific columns
LOAD * INLINE [ Onum, CID, Date
516, 1, 2020-10-05
557, 2, 2021-04-09
667, 3, 2020-11-15
333, 1, 2021-12-05
788, 3, 2021-02-08
667, 3, 2021-04-04
556, 2, 2020-10-31
556, 3, 2021-08-09
556, 3, 2021-09-09
333, 1, 2021-09-09
444, 1, 2020-10-01
516 1, 2020-10-06 ];
I want to remove the rows if the `ONUM` and `CID` are the same, nothing else. I don't really care if the first, or last is kept, as long as theres one distinct. Thanks!
Result:
LOAD * INLINE [ Onum,CID, Date
516, 1, 2020-10-05
557, 2, 2021-04-09
667, 3, 2020-11-15
788, 3, 2021-02-08
556, 2, 2020-10-31
556, 3, 2021-08-09
333, 1, 2021-09-09
444, 1, 2020-10-01
];
Load Onum, CID, Date(Max(Date)) as Date
Group by Onum, CID;
LOAD * INLINE [ Onum, CID, Date
516, 1, 2020-10-05
557, 2, 2021-04-09
667, 3, 2020-11-15
333, 1, 2021-12-05
788, 3, 2021-02-08
667, 3, 2021-04-04
556, 2, 2020-10-31
556, 3, 2021-08-09
556, 3, 2021-09-09
333, 1, 2021-09-09
444, 1, 2020-10-01
516 1, 2020-10-06 ];