SEQUENCE

All functions > ARRAY > SEQUENCE

Generates an array containing a sequence of numbers from start to stop with optional step.

Signatures

Returns: Array of numbers in the sequence

SEQUENCE(start: BIGINT, stop: BIGINT, [step: BIGINT]) → ARRAY<BIGINT>
sql
ParameterTypeRequiredDescription
startBIGINTYesStarting value (inclusive)
stopBIGINTYesEnding value (inclusive)
stepBIGINTNoOptional step value (default: 1)

Notes

  • Generates sequence from start to stop inclusive
  • Default step is 1
  • Can use negative step for descending sequences
  • Both start and stop are included in result
Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19