{"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","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"],"signature":"nth_value ( value anyelement, n integer ) [ null treatment ] → anyelement","signature_count":1,"slug":"nth-value","source_rev":"b7bd9cda","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":"b7bd9cda","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":"","description_zh_html":"","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":"","description_zh_html":"","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":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-WINDOW-TABLE","file":"functions-window.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"nth-value","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"nth_value","Summary":"返回在窗口帧的第n行求得的value（从1开始计数）；如果没有这样的行，则返回NULL。","BodyHTML":"返回在窗口帧的第\u003cem\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e行求得的\u003cem\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e（从1开始计数）；如果没有这样的行，则返回\u003ccode\u003eNULL\u003c/code\u003e。\u003cpre\u003enth_value ( value anyelement, n integer ) → anyelement\u003c/pre\u003e返回在窗口帧的第\u003cem\u003e\u003ccode\u003en\u003c/code\u003e\u003c/em\u003e行求得的\u003cem\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e（从1开始计数）；如果没有这样的行，则返回\u003ccode\u003eNULL\u003c/code\u003e。","SourceRevision":"1b5ca64c","ContentHash":"42e785f54316369f80019cb0abc824a52d5cecdff54247ef94ad67be517178d3","Payload":{"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。","signatures":[{"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。","returns":"anyelement","text":"nth_value ( value anyelement, n integer ) → anyelement","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","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":"","description_zh_html":"","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":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
