Skip to content

CumeDist

Calculates the cumulative distribution of a value within a partition, representing the relative position of the current row as a fraction of total rows.

Category: window

Syntax:

CumeDist()

Returns: Float

Context Filtering: ✓ Yes

Parameters

This function takes no parameters. The cumulative distribution is calculated based on the current row's position within the partition.

Validation

  • Minimum parameters: 0
  • Maximum parameters: 0

Examples

CumeDist()

Returns a value between 0 and 1 representing the cumulative distribution of the current row.

CumeDist()

When used with an ORDER BY clause, returns the percentage of rows with values less than or equal to the current row's value. Result: Values range from 0.0 to 1.0

  • PercentRank - Calculates relative rank as percentage
  • Rank - Assigns rank with gaps
  • DenseRank - Assigns rank without gaps
  • RowNumber - Assigns sequential row numbers