{"Entry":{"collection":"func","key":"avg","name":"avg","aliases":[],"metadata":{"changed_in":["7.3","8.4"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"7.2","group_changed":null,"signatures":{"added":["avg ( expression ) → numeric for any integer type argument, double precision for a floating-point argument, otherwise the same as the argument data type"],"removed":["AVG ( expression )"]},"status":"changed","to":"7.3"},{"descriptions_changed":false,"doc_overhaul":false,"from":"8.3","group_changed":null,"signatures":{"added":["avg ( expression ) → numeric for any integer-type argument, double precision for a floating-point argument, otherwise the same as the argument data type"],"removed":["avg ( expression ) → numeric for any integer type argument, double precision for a floating-point argument, otherwise the same as the argument data type"]},"status":"changed","to":"8.4"},{"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":"c66f19fe023a150a1276f48c3274956d2de6986ec86b4d863ad0b11d485fb089","first_version":"7.1","group":"aggregate","group_label":"Aggregate Functions","groups":["aggregate"],"imported_at":"2026-09-27T17:57:28.896817+08:00","last_version":"20","name":"avg","name_key":"avg","position":21002,"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":"avg ( smallint ) → numeric","signature_count":7,"slug":"avg","source_rev":"b7bd9cda","summary":"Computes the average (arithmetic mean) of all the non-null input values.","summary_zh":""}},"Definition":{"Collection":"func","Key":"avg","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"avg","SourceRevision":"b7bd9cda","Facts":{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all 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 average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003esmallint\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003enumeric\u003c/code\u003e","returns":"numeric","text":"avg ( smallint ) → numeric","zh_from":""},{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003enumeric\u003c/code\u003e","returns":"numeric","text":"avg ( integer ) → numeric","zh_from":""},{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003enumeric\u003c/code\u003e","returns":"numeric","text":"avg ( bigint ) → numeric","zh_from":""},{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003enumeric\u003c/code\u003e","returns":"numeric","text":"avg ( numeric ) → numeric","zh_from":""},{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003ereal\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003edouble precision\u003c/code\u003e","returns":"double precision","text":"avg ( real ) → double precision","zh_from":""},{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003edouble precision\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003edouble precision\u003c/code\u003e","returns":"double precision","text":"avg ( double precision ) → double precision","zh_from":""},{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003einterval\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einterval\u003c/code\u003e","returns":"interval","text":"avg ( interval ) → interval","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-AGGREGATE-TABLE","file":"functions-aggregate.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"avg","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"avg","Summary":"计算所有非空输入值的平均值（算术平均值）。","BodyHTML":"计算所有非空输入值的平均值（算术平均值）。\u003cpre\u003eavg ( smallint ) → numeric\u003c/pre\u003e计算所有非空输入值的平均值（算术平均值）。\u003cpre\u003eavg ( integer ) → numeric\u003c/pre\u003e计算所有非空输入值的平均值（算术平均值）。\u003cpre\u003eavg ( bigint ) → numeric\u003c/pre\u003e计算所有非空输入值的平均值（算术平均值）。\u003cpre\u003eavg ( numeric ) → numeric\u003c/pre\u003e计算所有非空输入值的平均值（算术平均值）。\u003cpre\u003eavg ( real ) → double precision\u003c/pre\u003e计算所有非空输入值的平均值（算术平均值）。\u003cpre\u003eavg ( double precision ) → double precision\u003c/pre\u003e计算所有非空输入值的平均值（算术平均值）。\u003cpre\u003eavg ( interval ) → interval\u003c/pre\u003e计算所有非空输入值的平均值（算术平均值）。","SourceRevision":"ca936764","ContentHash":"52f4284afae19d5e66890aced7a9ac4a6899fabb83153c36256287a0d4332653","Payload":{"description_zh":"计算所有非空输入值的平均值（算术平均值）。","description_zh_html":"计算所有非空输入值的平均值（算术平均值）。","signatures":[{"description_zh":"计算所有非空输入值的平均值（算术平均值）。","description_zh_html":"计算所有非空输入值的平均值（算术平均值）。","returns":"numeric","text":"avg ( smallint ) → numeric","zh_from":"doc"},{"description_zh":"计算所有非空输入值的平均值（算术平均值）。","description_zh_html":"计算所有非空输入值的平均值（算术平均值）。","returns":"numeric","text":"avg ( integer ) → numeric","zh_from":"doc"},{"description_zh":"计算所有非空输入值的平均值（算术平均值）。","description_zh_html":"计算所有非空输入值的平均值（算术平均值）。","returns":"numeric","text":"avg ( bigint ) → numeric","zh_from":"doc"},{"description_zh":"计算所有非空输入值的平均值（算术平均值）。","description_zh_html":"计算所有非空输入值的平均值（算术平均值）。","returns":"numeric","text":"avg ( numeric ) → numeric","zh_from":"doc"},{"description_zh":"计算所有非空输入值的平均值（算术平均值）。","description_zh_html":"计算所有非空输入值的平均值（算术平均值）。","returns":"double precision","text":"avg ( real ) → double precision","zh_from":"doc"},{"description_zh":"计算所有非空输入值的平均值（算术平均值）。","description_zh_html":"计算所有非空输入值的平均值（算术平均值）。","returns":"double precision","text":"avg ( double precision ) → double precision","zh_from":"doc"},{"description_zh":"计算所有非空输入值的平均值（算术平均值）。","description_zh_html":"计算所有非空输入值的平均值（算术平均值）。","returns":"interval","text":"avg ( interval ) → interval","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":"a9eec06d76e6dca9825a2fe5b5753efe755dad0051dbda7ba6e6ad9fabbe0bac","Text":"avg ( smallint ) → numeric","Returns":"numeric","Payload":{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003esmallint\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003enumeric\u003c/code\u003e","returns":"numeric","text":"avg ( smallint ) → numeric","zh_from":""}},{"Version":"18","Ordinal":1,"Hash":"4c58928615174bdcf6debc0ae2a31e9a0251ee882424f1617c959169faa847f4","Text":"avg ( integer ) → numeric","Returns":"numeric","Payload":{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003enumeric\u003c/code\u003e","returns":"numeric","text":"avg ( integer ) → numeric","zh_from":""}},{"Version":"18","Ordinal":2,"Hash":"6ee4f3bba01e7200e71637363ce4bee82b97c44d5613a442a5e62a8ff6387bcc","Text":"avg ( bigint ) → numeric","Returns":"numeric","Payload":{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003enumeric\u003c/code\u003e","returns":"numeric","text":"avg ( bigint ) → numeric","zh_from":""}},{"Version":"18","Ordinal":3,"Hash":"4fa1cc5ef9a889b027b9b8cd356401e81f2500d5e45d10f619a301260a0ccc54","Text":"avg ( numeric ) → numeric","Returns":"numeric","Payload":{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003enumeric\u003c/code\u003e","returns":"numeric","text":"avg ( numeric ) → numeric","zh_from":""}},{"Version":"18","Ordinal":4,"Hash":"93500ae02e31e84570109a71348ae174ffad1643eec9bf38b20c785d54a69f82","Text":"avg ( real ) → double precision","Returns":"double precision","Payload":{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003ereal\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003edouble precision\u003c/code\u003e","returns":"double precision","text":"avg ( real ) → double precision","zh_from":""}},{"Version":"18","Ordinal":5,"Hash":"482d8d7a87bf5abc8eeaed67761d78339495e9fa6dbedfea69b7ce1aa803c980","Text":"avg ( double precision ) → double precision","Returns":"double precision","Payload":{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003edouble precision\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003edouble precision\u003c/code\u003e","returns":"double precision","text":"avg ( double precision ) → double precision","zh_from":""}},{"Version":"18","Ordinal":6,"Hash":"d23068d3a11233b4a8e780b8935e8c57ac23454de9251a8f6de856887fc5f9ca","Text":"avg ( interval ) → interval","Returns":"interval","Payload":{"description":"Computes the average (arithmetic mean) of all the non-null input values.","description_html":"Computes the average (arithmetic mean) of all the non-null input values.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eavg\u003c/code\u003e ( \u003ccode class=\"type\"\u003einterval\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einterval\u003c/code\u003e","returns":"interval","text":"avg ( interval ) → interval","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
