{"Entry":{"collection":"func","key":"nth-value","name":"nth_value","aliases":[],"metadata":{"changed_in":["19"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"8.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.4"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":false,"doc_overhaul":false,"from":"18","group_changed":null,"signatures":{"added":["nth_value ( value anyelement, n integer ) [ null treatment ] → anyelement"],"removed":["nth_value ( value anyelement, n integer ) → anyelement"]},"status":"changed","to":"19"}],"content_hash":"726046fd743565a0d0af338d5b963d98b074ed06249207d15a4ae65519a4734c","derived_content_hash":"1f8650740829c375130197a938bf3bf2b1838ac8a3deeca7bacd1ba9540b9e39","first_version":"8.4","group":"window","group_label":"Window Functions","groups":["window"],"imported_at":"2026-09-27T17:57:29.005072+08:00","last_version":"20","name":"nth_value","name_key":"nth_value","position":22004,"present_in":["8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"b7bd9cda","receipt_sha256":"e006700c18916e01698d963c7fe49060633cf05800d38e4e96e2f02ab54ad85a","repair":"wiki-repair-20261023"},"signature":"nth_value ( value anyelement, n integer ) [ null treatment ] → anyelement","signature_count":1,"slug":"nth-value","source_rev":"wiki-repair-20261023:2fd6b4a3b2aa705fa7cb16043400e8b175afc4bd8620f3e04f507703719af82c","summary":"Returns value evaluated at the row that is the n'th row of the window frame (counting from 1); returns NULL if there is no such row.","summary_zh":""}},"Definition":{"Collection":"func","Key":"nth-value","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"nth-value","SourceRevision":"wiki-repair-20261023:2fd6b4a3b2aa705fa7cb16043400e8b175afc4bd8620f3e04f507703719af82c","Facts":{"description":"Returns value evaluated at the row that is the n'th row of the window frame (counting from 1); returns NULL if there is no such row.","description_html":"Returns \u003cem class=\"parameter\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e evaluated at the row that is the \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e'th row of the window frame (counting from 1); returns \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if there is no such row.","description_zh":"返回在窗口帧的第 n 行求得的 value（从 1 开始计数）；如果没有这样的行，则返回 NULL。","description_zh_html":"返回在窗口帧的第 \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e 行求得的 \u003cem class=\"parameter\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e（从 1 开始计数）；如果没有这样的行，则返回 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。","doc":{"anchor":"FUNCTIONS-WINDOW-TABLE","file":"functions-window.html","slug":"18"},"group":"window","group_label":"Window Functions","lang":"en","layout":"table-new","pages":["functions-window.html"],"prose_only":false,"signatures":[{"description":"Returns value evaluated at the row that is the n'th row of the window frame (counting from 1); returns NULL if there is no such row.","description_html":"Returns \u003cem class=\"parameter\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e evaluated at the row that is the \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e'th row of the window frame (counting from 1); returns \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if there is no such row.","description_zh":"返回在窗口帧的第 n 行求得的 value（从 1 开始计数）；如果没有这样的行，则返回 NULL。","description_zh_html":"返回在窗口帧的第 \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e 行求得的 \u003cem class=\"parameter\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e（从 1 开始计数）；如果没有这样的行，则返回 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。","examples":[],"html":"\u003ccode class=\"function\"\u003enth_value\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eanyelement\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eanyelement\u003c/code\u003e","returns":"anyelement","text":"nth_value ( value anyelement, n integer ) → anyelement","zh_from":"same-version-pgdoc"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-window.html","sha256":"859f0e20306eeaf9a15406f95e01cb81a166cfbe2fd21534fc44df3f903b4e6d"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-WINDOW-TABLE","file":"functions-window.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"nth-value","SourceDatabase":"center","Version":"18","Locale":"en","Title":"nth_value","Summary":"Returns value evaluated at the row that is the n'th row of the window frame (counting from 1); returns NULL if there is no such row.","BodyHTML":"Returns \u003cem\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e evaluated at the row that is the \u003cem\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e\u0026#39;th row of the window frame (counting from 1); returns \u003ccode\u003eNULL\u003c/code\u003e if there is no such row.","SourceRevision":"wiki-repair-20261023:2fd6b4a3b2aa705fa7cb16043400e8b175afc4bd8620f3e04f507703719af82c","ContentHash":"68d00e9830e74d6dfd26f5bd0f49694b26d94f7e10966e4feb07a9102977865b","Payload":{"description":"Returns value evaluated at the row that is the n'th row of the window frame (counting from 1); returns NULL if there is no such row.","description_html":"Returns \u003cem class=\"parameter\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e evaluated at the row that is the \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e'th row of the window frame (counting from 1); returns \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if there is no such row.","signatures":[{"description":"Returns value evaluated at the row that is the n'th row of the window frame (counting from 1); returns NULL if there is no such row.","description_html":"Returns \u003cem class=\"parameter\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e evaluated at the row that is the \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e'th row of the window frame (counting from 1); returns \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if there is no such row.","description_zh":"返回在窗口帧的第 n 行求得的 value（从 1 开始计数）；如果没有这样的行，则返回 NULL。","description_zh_html":"返回在窗口帧的第 \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e 行求得的 \u003cem class=\"parameter\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e（从 1 开始计数）；如果没有这样的行，则返回 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。","examples":[],"html":"\u003ccode class=\"function\"\u003enth_value\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eanyelement\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eanyelement\u003c/code\u003e","returns":"anyelement","text":"nth_value ( value anyelement, n integer ) → anyelement","zh_from":"same-version-pgdoc"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"5f74ced2268a9d88341846d192ec4ae9e8fc0cb3650abf2c5050c3e6a934fb64","Text":"nth_value ( value anyelement, n integer ) → anyelement","Returns":"anyelement","Payload":{"description":"Returns value evaluated at the row that is the n'th row of the window frame (counting from 1); returns NULL if there is no such row.","description_html":"Returns \u003cem class=\"parameter\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e evaluated at the row that is the \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e'th row of the window frame (counting from 1); returns \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e if there is no such row.","description_zh":"返回在窗口帧的第 n 行求得的 value（从 1 开始计数）；如果没有这样的行，则返回 NULL。","description_zh_html":"返回在窗口帧的第 \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e 行求得的 \u003cem class=\"parameter\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e（从 1 开始计数）；如果没有这样的行，则返回 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。","examples":[],"html":"\u003ccode class=\"function\"\u003enth_value\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eanyelement\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eanyelement\u003c/code\u003e","returns":"anyelement","text":"nth_value ( value anyelement, n integer ) → anyelement","zh_from":"same-version-pgdoc"}}],"Spellings":null,"SQLState":null,"Evidence":null}
