Hi You could use Proc SQL and find the maximum value for the date within a group, like so:
data have;
infile cards;
input
AccountNumber1 PNumber SNumber Date : mmddyy.
;
format date date9.;
cards;
112335 2233 124 01/01/2017
112335 2233 124 06/01/2017
112335 1111 126 06/01/2017
112335 1111 126 07/01/2017
112335 2233 124 07/01/2017
112257 2234 124 01/01/2017
;
proc sql;
select
AccountNumber1
, PNumber
, SNumber
, max(Date) as lastDate format=date9.
, count(*) as nRows
from
have
group by
AccountNumber1
, PNumber
, SNumber
;
quit;
Bruno
... View more