{"Entry":{"collection":"func","key":"cume-dist","name":"cume_dist","aliases":[],"metadata":{"changed_in":["9.4"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"8.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.4"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.3","group_changed":{"from":"window","to":"aggregate"},"signatures":{"added":["cume_dist ( args ) WITHIN GROUP (ORDER BY sorted_args) → double precision"],"removed":[]},"status":"changed","to":"9.4"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"0ef9923cf96b926c7594d364d3866185a6a4a5187944854d154b006a560a5a44","first_version":"8.4","group":"aggregate","group_label":"Aggregate Functions","groups":["aggregate","window"],"imported_at":"2026-09-27T17:57:28.922005+08:00","last_version":"20","name":"cume_dist","name_key":"cume_dist","position":21012,"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":"cume_dist ( args ) WITHIN GROUP ( ORDER BY sorted_args ) → double precision","signature_count":2,"slug":"cume-dist","source_rev":"b7bd9cda","summary":"Computes the cumulative distribution, that is (number of rows preceding or peers with hypothetical row) / (total rows).","summary_zh":""}},"Definition":{"Collection":"func","Key":"cume-dist","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"cume-dist","SourceRevision":"b7bd9cda","Facts":{"description":"Computes the cumulative distribution, that is (number of rows preceding or peers with hypothetical row) / (total rows). The value thus ranges from 1/N to 1.","description_html":"Computes the cumulative distribution, that is (number of rows preceding or peers with hypothetical row) / (total rows). The value thus ranges from 1/\u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e to 1.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-HYPOTHETICAL-TABLE","file":"functions-aggregate.html","slug":"18"},"group":"aggregate","group_label":"Aggregate Functions","lang":"en","layout":"table-new","pages":["functions-aggregate.html","functions-window.html"],"prose_only":false,"signatures":[{"description":"Computes the cumulative distribution, that is (number of rows preceding or peers with hypothetical row) / (total rows). The value thus ranges from 1/N to 1.","description_html":"Computes the cumulative distribution, that is (number of rows preceding or peers with hypothetical row) / (total rows). The value thus ranges from 1/\u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e to 1.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003ecume_dist\u003c/code\u003e ( \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargs\u003c/code\u003e\u003c/em\u003e ) \u003ccode class=\"literal\"\u003eWITHIN GROUP\u003c/code\u003e ( \u003ccode class=\"literal\"\u003eORDER BY\u003c/code\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003esorted_args\u003c/code\u003e\u003c/em\u003e ) → \u003ccode class=\"returnvalue\"\u003edouble precision\u003c/code\u003e","returns":"double precision","text":"cume_dist ( args ) WITHIN GROUP ( ORDER BY sorted_args ) → double precision","zh_from":""},{"description":"Returns the cumulative distribution, that is (number of partition rows preceding or peers with current row) / (total partition rows). The value thus ranges from 1/N to 1.","description_html":"Returns the cumulative distribution, that is (number of partition rows preceding or peers with current row) / (total partition rows). The value thus ranges from 1/\u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e to 1.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003ecume_dist\u003c/code\u003e () → \u003ccode class=\"returnvalue\"\u003edouble precision\u003c/code\u003e","returns":"double precision","text":"cume_dist () → double precision","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-HYPOTHETICAL-TABLE","file":"functions-aggregate.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"cume-dist","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"cume_dist","Summary":"计算累积分布，也就是(位于假设行之前或与假设行同等的行数)/(总行数)。取值范围为 1/N 到 1。","BodyHTML":"计算累积分布，也就是(位于假设行之前或与假设行同等的行数)/(总行数)。取值范围为 1/\u003cem\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e 到 1。\u003cpre\u003ecume_dist ( args ) WITHIN GROUP ( ORDER BY sorted_args ) → double precision\u003c/pre\u003e计算累积分布，也就是(位于假设行之前或与假设行同等的行数)/(总行数)。取值范围为 1/\u003cem\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e 到 1。\u003cpre\u003ecume_dist () → double precision\u003c/pre\u003e返回累积分布，也就是(当前行之前或与当前行同等的分区行数)/(总的分区行数)。取值范围为1/\u003cem\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e 到 1。","SourceRevision":"1b5ca64c","ContentHash":"a27b6a5ebc4d4f3544c1bae1d03c03a060a4ef5174818a9c9eb803f7c857de31","Payload":{"description_zh":"计算累积分布，也就是(位于假设行之前或与假设行同等的行数)/(总行数)。取值范围为 1/N 到 1。","description_zh_html":"计算累积分布，也就是(位于假设行之前或与假设行同等的行数)/(总行数)。取值范围为 1/\u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e 到 1。","signatures":[{"description_zh":"计算累积分布，也就是(位于假设行之前或与假设行同等的行数)/(总行数)。取值范围为 1/N 到 1。","description_zh_html":"计算累积分布，也就是(位于假设行之前或与假设行同等的行数)/(总行数)。取值范围为 1/\u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e 到 1。","returns":"double precision","text":"cume_dist ( args ) WITHIN GROUP ( ORDER BY sorted_args ) → double precision","zh_from":"doc"},{"description_zh":"返回累积分布，也就是(当前行之前或与当前行同等的分区行数)/(总的分区行数)。取值范围为1/N 到 1。","description_zh_html":"返回累积分布，也就是(当前行之前或与当前行同等的分区行数)/(总的分区行数)。取值范围为1/\u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e 到 1。","returns":"double precision","text":"cume_dist () → double precision","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":"f8901e3fb4fbe61f6627ddd0e88477ac99629f9474e55e1538136065198394de","Text":"cume_dist ( args ) WITHIN GROUP ( ORDER BY sorted_args ) → double precision","Returns":"double precision","Payload":{"description":"Computes the cumulative distribution, that is (number of rows preceding or peers with hypothetical row) / (total rows). The value thus ranges from 1/N to 1.","description_html":"Computes the cumulative distribution, that is (number of rows preceding or peers with hypothetical row) / (total rows). The value thus ranges from 1/\u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e to 1.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003ecume_dist\u003c/code\u003e ( \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargs\u003c/code\u003e\u003c/em\u003e ) \u003ccode class=\"literal\"\u003eWITHIN GROUP\u003c/code\u003e ( \u003ccode class=\"literal\"\u003eORDER BY\u003c/code\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003esorted_args\u003c/code\u003e\u003c/em\u003e ) → \u003ccode class=\"returnvalue\"\u003edouble precision\u003c/code\u003e","returns":"double precision","text":"cume_dist ( args ) WITHIN GROUP ( ORDER BY sorted_args ) → double precision","zh_from":""}},{"Version":"18","Ordinal":1,"Hash":"db9c819b017d65ed728c2279a83b7e425694198d7c2a368bcedacce43a2e6268","Text":"cume_dist () → double precision","Returns":"double precision","Payload":{"description":"Returns the cumulative distribution, that is (number of partition rows preceding or peers with current row) / (total partition rows). The value thus ranges from 1/N to 1.","description_html":"Returns the cumulative distribution, that is (number of partition rows preceding or peers with current row) / (total partition rows). The value thus ranges from 1/\u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e to 1.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003ecume_dist\u003c/code\u003e () → \u003ccode class=\"returnvalue\"\u003edouble precision\u003c/code\u003e","returns":"double precision","text":"cume_dist () → double precision","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
