[]
        
(Showing Draft Content)

ROWNUMBER

This function returns the number of the current row within its partition.

Row numbers range from 1 to the number of partition rows. It neither requires ORDERBY nor accepts window frame definitions, such as FRAMEROWS and FRAMERANGE.

Syntax

ROWNUMBER()

Example

// WINDOW(ROWNUMBER())

city      |   sold     |    row_number
------------------------------------------
Paris         100             1
Berlin        150             2
Moscow        200             3
Rome          200             4
London        300             5