COUNTBY: Incrementing Column Values Row by Row

How to:

The COUNTBY function produces a column whose values are incremented row by row by a specified amount.


Top of page

x
Syntax: How to Increment Column Values Row by Row
COUNTBY(arg)

where:

arg

Integer

Is the value that is incremented for each record.

This function returns an integer value.



Example: Incrementing Column Values Row by Row

In the query,

SELECT COUNTBY(1), COUNTBY(2) FROM T

the first column takes on the values 1, 2, 3, ..., and the second column takes on the values 2, 4, 6, ...


iWay Software