data r;
set k;
by city;
if first.city then seq+1;
run;
If not then do
data r;
if _n_=1 then do;
dcl hash h();
h.defineKey ("city");
h.defineData ("seq");
h.defineDone ();
end;
set K;
if h.find() ne 0 then do;
seq+1;h.add();
end;
run;
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!