{"Entry":{"collection":"func","key":"sum","name":"sum","aliases":[],"metadata":{"changed_in":["7.2","7.3","8.1","9.0"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"7.1","group_changed":null,"signatures":{"added":["sum ( expression )"],"removed":["SUM ( expression )"]},"status":"changed","to":"7.2"},{"descriptions_changed":false,"doc_overhaul":false,"from":"7.2","group_changed":null,"signatures":{"added":["sum ( expression ) → bigint for smallint or integer arguments, numeric for bigint arguments, double precision for floating-point arguments, otherwise the same as the argument data type"],"removed":["sum ( expression )"]},"status":"changed","to":"7.3"},{"descriptions_changed":false,"doc_overhaul":false,"from":"8.0","group_changed":null,"signatures":{"added":["sum ( expression ) → bigint for smallint or int arguments, numeric for bigint arguments, double precision for floating-point arguments, otherwise the same as the argument data type"],"removed":["sum ( expression ) → bigint for smallint or integer arguments, numeric for bigint arguments, double precision for floating-point arguments, otherwise the same as the argument data type"]},"status":"changed","to":"8.1"},{"descriptions_changed":false,"doc_overhaul":false,"from":"8.4","group_changed":null,"signatures":{"added":["sum ( expression ) → bigint for smallint or int arguments, numeric for bigint arguments, otherwise the same as the argument data type"],"removed":["sum ( expression ) → bigint for smallint or int arguments, numeric for bigint arguments, double precision for floating-point arguments, otherwise the same as the argument data type"]},"status":"changed","to":"9.0"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.3","group_changed":null,"signatures":{"added":[],"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":"1948a38def96ddfdf5048b30c069306d6ab0308a203adebd8f9b2ed40865ded0","first_version":"7.1","group":"aggregate","group_label":"Aggregate Functions","groups":["aggregate"],"imported_at":"2026-09-27T17:57:28.976419+08:00","last_version":"20","name":"sum","name_key":"sum","position":21052,"present_in":["7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","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":"sum ( smallint ) → bigint","signature_count":8,"slug":"sum","source_rev":"b7bd9cda","summary":"Computes the sum of the non-null input values.","summary_zh":""}},"Definition":{"Collection":"func","Key":"sum","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"sum","SourceRevision":"b7bd9cda","Facts":{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-AGGREGATE-TABLE","file":"functions-aggregate.html","slug":"18"},"group":"aggregate","group_label":"Aggregate Functions","lang":"en","layout":"table-new","pages":["functions-aggregate.html"],"prose_only":false,"signatures":[{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003esmallint\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"sum ( smallint ) → bigint","zh_from":""},{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"sum ( integer ) → bigint","zh_from":""},{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003enumeric\u003c/code\u003e","returns":"numeric","text":"sum ( bigint ) → numeric","zh_from":""},{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003enumeric\u003c/code\u003e","returns":"numeric","text":"sum ( numeric ) → numeric","zh_from":""},{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003ereal\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ereal\u003c/code\u003e","returns":"real","text":"sum ( real ) → real","zh_from":""},{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003edouble precision\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003edouble precision\u003c/code\u003e","returns":"double precision","text":"sum ( double precision ) → double precision","zh_from":""},{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003einterval\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einterval\u003c/code\u003e","returns":"interval","text":"sum ( interval ) → interval","zh_from":""},{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003emoney\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003emoney\u003c/code\u003e","returns":"money","text":"sum ( money ) → money","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-AGGREGATE-TABLE","file":"functions-aggregate.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"sum","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"sum","Summary":"计算非空输入值的总和。","BodyHTML":"计算非空输入值的总和。\u003cpre\u003esum ( smallint ) → bigint\u003c/pre\u003e计算非空输入值的总和。\u003cpre\u003esum ( integer ) → bigint\u003c/pre\u003e计算非空输入值的总和。\u003cpre\u003esum ( bigint ) → numeric\u003c/pre\u003e计算非空输入值的总和。\u003cpre\u003esum ( numeric ) → numeric\u003c/pre\u003e计算非空输入值的总和。\u003cpre\u003esum ( real ) → real\u003c/pre\u003e计算非空输入值的总和。\u003cpre\u003esum ( double precision ) → double precision\u003c/pre\u003e计算非空输入值的总和。\u003cpre\u003esum ( interval ) → interval\u003c/pre\u003e计算非空输入值的总和。\u003cpre\u003esum ( money ) → money\u003c/pre\u003e计算非空输入值的总和。","SourceRevision":"ca936764","ContentHash":"b17abd24367abbd46b90b5901a4089b5550bfa6192060021cc2f23d9c980583e","Payload":{"description_zh":"计算非空输入值的总和。","description_zh_html":"计算非空输入值的总和。","signatures":[{"description_zh":"计算非空输入值的总和。","description_zh_html":"计算非空输入值的总和。","returns":"bigint","text":"sum ( smallint ) → bigint","zh_from":"doc"},{"description_zh":"计算非空输入值的总和。","description_zh_html":"计算非空输入值的总和。","returns":"bigint","text":"sum ( integer ) → bigint","zh_from":"doc"},{"description_zh":"计算非空输入值的总和。","description_zh_html":"计算非空输入值的总和。","returns":"numeric","text":"sum ( bigint ) → numeric","zh_from":"doc"},{"description_zh":"计算非空输入值的总和。","description_zh_html":"计算非空输入值的总和。","returns":"numeric","text":"sum ( numeric ) → numeric","zh_from":"doc"},{"description_zh":"计算非空输入值的总和。","description_zh_html":"计算非空输入值的总和。","returns":"real","text":"sum ( real ) → real","zh_from":"doc"},{"description_zh":"计算非空输入值的总和。","description_zh_html":"计算非空输入值的总和。","returns":"double precision","text":"sum ( double precision ) → double precision","zh_from":"doc"},{"description_zh":"计算非空输入值的总和。","description_zh_html":"计算非空输入值的总和。","returns":"interval","text":"sum ( interval ) → interval","zh_from":"doc"},{"description_zh":"计算非空输入值的总和。","description_zh_html":"计算非空输入值的总和。","returns":"money","text":"sum ( money ) → money","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","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":"54972d3461cd35b04a3f490e81ac78afa7702d64e4cdc22d015cbf614eed5f2f","Text":"sum ( smallint ) → bigint","Returns":"bigint","Payload":{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003esmallint\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"sum ( smallint ) → bigint","zh_from":""}},{"Version":"18","Ordinal":1,"Hash":"3bf8eaeb3479549c3f5cb835cc91547de9d801d15ff38776fbc11cefe2f0f087","Text":"sum ( integer ) → bigint","Returns":"bigint","Payload":{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"sum ( integer ) → bigint","zh_from":""}},{"Version":"18","Ordinal":2,"Hash":"fb6c7bea9bca9daf27c11cc7a0ca4e7430759171b8abf9745a926865e3880136","Text":"sum ( bigint ) → numeric","Returns":"numeric","Payload":{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003enumeric\u003c/code\u003e","returns":"numeric","text":"sum ( bigint ) → numeric","zh_from":""}},{"Version":"18","Ordinal":3,"Hash":"ea904c0eb94871fb415d86abbbc55ff184717c10dd08346b6b84eedf36d91e42","Text":"sum ( numeric ) → numeric","Returns":"numeric","Payload":{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003enumeric\u003c/code\u003e","returns":"numeric","text":"sum ( numeric ) → numeric","zh_from":""}},{"Version":"18","Ordinal":4,"Hash":"b1d8d19a86cf9f01b94df3152196353a0af3d0d7b8389df70eb953162486f99b","Text":"sum ( real ) → real","Returns":"real","Payload":{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003ereal\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ereal\u003c/code\u003e","returns":"real","text":"sum ( real ) → real","zh_from":""}},{"Version":"18","Ordinal":5,"Hash":"3f8a2df602a7b0d74b413fb0d110405be20fff45e3e68c51a5d51528e526c472","Text":"sum ( double precision ) → double precision","Returns":"double precision","Payload":{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003edouble precision\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003edouble precision\u003c/code\u003e","returns":"double precision","text":"sum ( double precision ) → double precision","zh_from":""}},{"Version":"18","Ordinal":6,"Hash":"84cec623dfad3310d349ac35c392dc3dc21bc5919f936f74c6036681b7b9e8a2","Text":"sum ( interval ) → interval","Returns":"interval","Payload":{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003einterval\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einterval\u003c/code\u003e","returns":"interval","text":"sum ( interval ) → interval","zh_from":""}},{"Version":"18","Ordinal":7,"Hash":"1b563f8cc7d56f1f2e8a2ffe108233cc3d709ac073aa0c142a0ba3b876e9a792","Text":"sum ( money ) → money","Returns":"money","Payload":{"description":"Computes the sum of the non-null input values.","description_html":"Computes the sum of the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003esum\u003c/code\u003e ( \u003ccode class=\"type\"\u003emoney\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003emoney\u003c/code\u003e","returns":"money","text":"sum ( money ) → money","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
