Here is an example of a simple way to create a table with just the top 10 for each group(site)
names default to here(1);
dt=// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << sort(by(:sex, :height), order(descending,descending), replace table(1));
dt<< select where(col cumulative sum(1, :sex) <=10);
dtFinal = dt << subset(output table("Top 10"), selected rows(1), selected columns(0));
Jim