Here is an example of doing a similar thing using the Big Class data table
Names Default To Here( 1 );
dt =
// Open Data Table: big class.jmp
// → Data Table( "big class" )
Open( "$SAMPLE_DATA/big class.jmp" );
dt << select where(col max(:height,:sex) == :height );
dt << subset(selected rows(1), columns({"Sex","Height","Weight"}));
Jim