The Row Number function returns a sequential number starting at 1 for each row in the answer set, based on sorting by one or more columns or expressions. Optionally, one or more columns or expressions can be specified to identify partitions in the result set such that the row number starts at 1 within each partition.
When dragging a Row Number function into a variable, the following tree element is created.
Sort expressions can be built up in the Sort Expressions folder and partition expressions can be built up in the Partition Columns folder. The following is an example of a Row Number request, sorting by cust_id in a descending order (note the use of the ASC/DESC Order SQL element) and partitioning by a combination of the columns gender and marital_status.
There are no special properties for the Row Number function.