ranki()

Read(644) Label: interative loop, number records,

Description:

An interative loop for numbering records according to the values of certain fields.

Syntax:

ranki(F;Gi,…)

Note:

The function performs a loop operation to number records from 1 according to the value of Gi field. With the same Gi field value, records having the same F field value will be given the same sequence number; add 1 to the sequence number when F field value changes. When the value of Gi field changes, start a new round of the numbering process.

Parameters:

F/ Gi

Field name

Return value:

Integer

Example:

 

A

 

1

=demo.query("select * from SCORES ")

 

2

=A1.derive(ranki(STUDENTID;CLASS):F1)