Sort() rearranges the rows of a table according to the values of one or more columns, either replacing the current table or creating a new table with the results. Specify ascending or descending sort for each By column.
dt << Sort(
	"Private", "Invisible", Replace table, By( columns ), Order( Descending | Ascending ) );
The following example creates a new data table based on Big Class.jmp that sorts the data in descending order by age and by name:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sortedDt = dt << Sort(
	By( :age, :name ),
	Order( Descending, Ascending ),
	output table name( "Sorted age name" ) );

Help created on 7/12/2018