This code shows one way to go about it. I ran it against this data:
![3898_pastedImage_2.png 3898_pastedImage_2.png](https://community.jmp.com/t5/image/serverpage/image-id/193i9196F528B842EA8A/image-size/medium?v=v2&px=400)
mydt = data table("MyDemo");
mydtsummary = Data Table( "MyDemo" ) << Summary(
Group( :SN ),
Max( :DT ),
statistics column name format( "stat of column" )
);
mydt << Update(
With( Data Table( mydtsummary) ),
Match Columns( :SN = :SN ),
Add Columns from Update table( :Max of DT )
);
mydt << select where(:DT == :Max of DT) << invert row selection;
mydt << delete rows;
mydt << delete columns("Max of DT");
close(mydtsummary, nosave);