Link to home
Start Free TrialLog in
Avatar of tech
tech

asked on

Delete duplicate records

https://www.experts-exchange.com/questions/29166962/Delete-unwanted-records.html?anchorAnswerId=42997133#a42997133

id         X              year
45      1375      2018
23      1514      2018
67      1516      2017
32      1516      2018
78      1502      2018
54      1908      2017
11      1908      2018
24      1908      2015
98      1908      2016
85      1908      2018
52      1908      2016

for above data, the above code generates the following output.


id      X      year
54      1908      2017
11      1908      2018
24      1908      2015
98      1908      2016
85      1908      2018
52      1908      2016

I wanted to delete the duplicate records from the above output when X and year are same so that the output should be

id          X              year
54      1908      2017
11      1908      2018
24      1908      2015
98      1908      2016
ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tech
tech

ASKER

The code works, thanks a million.