Returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition. $sql = ' SELECT ROW_NUMBER() OVER ...