cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
kyf
kyf
Level I

How to do FIRST_VALUE() OVER in JMP script?

How to do FIRST_VALUE() OVER in JMP script?

 

SELECT

FIRST_VALUE(..) OVER (PARTITION BY .. ORDER BY ..) AS ..

FROM ..

 

1 REPLY 1
txnelson
Super User

Re: How to do FIRST_VALUE() OVER in JMP script?

Here are a couple of ways to do a similar selection

names default to here(1);
dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

// Find the Name of the tallest person by sorting
sortDT = dt << sort(by(:height), order(descending));
value = sortDT:name[1];
close( sortDT, nosave );
show("Tallest by sorting",value);

// Tallest by selection
value = :Name[(dt<<get rows where( :height == col max(:height) ))[1]];
show("Tallest by selection", value );
Jim