--- The rows returned by grouping and sorting may be interrupted in the middle of the positions in the reorganization.
Select fileid, fileclass, userid, rank () over (partition by fileclass order by userid) from files
---- The rows returned by grouping and sorting are not interrupted between the positions in the reorganization. The number of groups is based on the parameters in the ntile (parameter ).
Select fileid, fileclass, userid, ntile (3) over (partition by fileclass order by userid) from files
---- The rows returned by grouping are in the center of the first position in the reorganization.
Select fileid, fileclass, userid, dense_rank () over (partition by fileclass order by userid) from files
---- The rows returned by grouping and sorting are not interrupted in the order position of the reorganization.
Select fileid, fileclass, userid, row_number () over (partition by fileclass order by userid) from files