data have; infile cards dsd; informat date mmddyy10.; format date mmddyy10.; input id $ date; cards; 1,1/1/2011 1,1/1/2011 1,2/3/2011 2,2/2/2011 2,3/5/2012 2,3/5/2012 2,4/8/2012 3,2/5/2011 3,2/5/2011 3,3/8/2011 3,4/9/2011 ; run; data want; set have; by id date; if first.id then count=0; if first.date then count+1; retain count; run;
... View more