There is a function called
Select Duplicate Rows()
that can be used for this, however it is based upon finding rows following a unique row. Therefore, the table needs to be sorted in reverse before using the function. Below is a sample script to do this. Since I did not have a sample data table to run this on, the script has not been tested, however it is very close to being what you need.
Documentation on the function can be found in the Scripting Index
Names Default To Here( 1 );
dt = Current Data Table();
// Add a new column to preserve the current order
dt << New Column( "rowNum", formula( Row() ) );
// Remove the formula to convert values to static values
:rowNum << delete property( "formula" );
// Sort the data table in referse order, since one wants to
// keep the most recent value
dt << sort( by( rowNum ), order( descending ), Replace Table( 1 ) );
// Find the duplicate rows
dt << Select Duplicate Rows( Match( :SerialNo, :Date, :Retest ) );
// Delete Duplicates
dt << delete rows;
// Reorder the table
dt << sort( by( rowNum ), order( ascending ), Replace Table( 1 ) );
// Delete rowNum column
dt << delete columns( "rowNum" );
Jim