ntile ( num_buckets integer ) → integer → integerReturns an integer ranging from 1 to the argument value, dividing the partition as equally as possible.
ntile
Returns an integer ranging from 1 to the argument value, dividing the partition as equally as possible.
English manual coverage begins with PostgreSQL 7.1. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- group
- window
- group label
- Window Functions
- lang
- en
- layout
- table-new
- pages
- functions-window.html
- prose only
- false
Definition PG 18
Returns an integer ranging from 1 to the argument value, dividing the partition as equally as possible.
Signatures and overloads
Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · wiki-repair-20261023:55f6281d1d6766851a3f3c9c860b53ff82c204a0b584428c3109c7cdbedbb4c6
Text language: en · wiki-repair-20261023:55f6281d1d6766851a3f3c9c860b53ff82c204a0b584428c3109c7cdbedbb4c6