Hello guys,
I need your help with a little issue here:
I had a big database, then wrote Proc Sort, with some criterias and now have this:
id date cam amount
4701 11JAN2018 1 $30.00
4701 09JAN2018 0 $30.00
16044 16JAN2018 1 $40.00
28563 30JAN2018 0 $10.00
this is the proc sort I wrote before:
proc sort data=lib.RESULT out=lib.RESULT
nodupkey; by id cam;
RUN;
the question is that now I want to add something in my proc sort to tell sas (if id is duplicated), select those values when date is smaller and 'cam' is 1. these are the priorities. how can I do that? can anobody help?