{"Entry":{"collection":"func","key":"mode","name":"mode","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"9.4"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"302d5217e5319233236b1aa5ac1b6e0a6df18ed08c09639259b8b6f7cb49eb7b","derived_content_hash":"82931b5a0f3254857f1d1d62a9276de9abf789c656e5511ecb198f38aa6f4168","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:85b6d9e3f8f9a07d7dab485c62b2590c07e6f867c128aa5f75306c516376fe5c","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"9.4","group":"aggregate","group_label":"Aggregate Functions","groups":["aggregate"],"imported_at":"2026-09-14T21:49:48.861708+08:00","last_version":"20","name":"mode","name_key":"mode","position":21032,"present_in":["9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"2026-09-14T13:14:25.684213+00:00@99e6866c","receipt_sha256":"400f734e2c02e14404b87c4daaf02bf8248a91a9745f6edc3deae2822d142dc9","repair":"wiki-repair-20261023"},"signature":"mode () WITHIN GROUP ( ORDER BY anyelement ) → anyelement","signature_count":1,"slug":"mode","source_rev":"wiki-repair-20261023:85b6d9e3f8f9a07d7dab485c62b2590c07e6f867c128aa5f75306c516376fe5c","summary":"Computes the mode, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values).","summary_zh":""}},"Definition":{"Collection":"func","Key":"mode","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"mode","SourceRevision":"wiki-repair-20261023:85b6d9e3f8f9a07d7dab485c62b2590c07e6f867c128aa5f75306c516376fe5c","Facts":{"description":"Computes the mode, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values). The aggregated argument must be of a sortable type.","description_html":"Computes the \u003cem class=\"firstterm\"\u003emode\u003c/em\u003e, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values). The aggregated argument must be of a sortable type.","description_zh":"计算众数，即聚合参数中出现次数最多的值（若多个值的出现次数相同且最多，则任意选择其中第一个）。聚合参数必须是可排序类型。","description_zh_html":"计算\u003cem class=\"firstterm\"\u003e众数\u003c/em\u003e，即聚合参数中出现次数最多的值（若多个值的出现次数相同且最多，则任意选择其中第一个）。聚合参数必须是可排序类型。","doc":{"anchor":"FUNCTIONS-ORDEREDSET-TABLE","file":"functions-aggregate.html","sha256":"31d3dcd36ef353484b4b3535f9f0d1cc239c3910146257fe5178f99b90b501e2","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-aggregate.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"31d3dcd36ef353484b4b3535f9f0d1cc239c3910146257fe5178f99b90b501e2","version":"18.7"},{"file":"functions-aggregate.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"0bf7506d27b71666fc74840a21a8f77c8a92735174f1d05033865961722e457c","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"aggregate","group_label":"聚合函数","lang":"en","layout":"table-new","pages":["functions-aggregate.html"],"prose_only":false,"signatures":[{"description":"Computes the mode, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values). The aggregated argument must be of a sortable type.","description_html":"Computes the \u003cem class=\"firstterm\"\u003emode\u003c/em\u003e, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values). The aggregated argument must be of a sortable type.","description_zh":"计算众数，即聚合参数中出现次数最多的值（若多个值的出现次数相同且最多，则任意选择其中第一个）。聚合参数必须是可排序类型。","description_zh_html":"计算\u003cem class=\"firstterm\"\u003e众数\u003c/em\u003e，即聚合参数中出现次数最多的值（若多个值的出现次数相同且最多，则任意选择其中第一个）。聚合参数必须是可排序类型。","examples":[],"html":"\u003ccode class=\"function\"\u003emode\u003c/code\u003e () \u003ccode class=\"literal\"\u003eWITHIN GROUP\u003c/code\u003e ( \u003ccode class=\"literal\"\u003eORDER BY\u003c/code\u003e \u003ccode class=\"type\"\u003eanyelement\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eanyelement\u003c/code\u003e","returns":"anyelement","text":"mode () WITHIN GROUP ( ORDER BY anyelement ) → anyelement","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-aggregate.html","sha256":"68da7af09e2749a855188bbbff99ae036fc7eece4e19b8e048baffd28aa3ca59"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-ORDEREDSET-TABLE","file":"functions-aggregate.html","sha256":"31d3dcd36ef353484b4b3535f9f0d1cc239c3910146257fe5178f99b90b501e2","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"mode","SourceDatabase":"center","Version":"18","Locale":"en","Title":"mode","Summary":"Computes the mode, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values). The aggregated argument must be of a sortable type.","BodyHTML":"Computes the \u003cem\u003emode\u003c/em\u003e, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values). The aggregated argument must be of a sortable type.","SourceRevision":"wiki-repair-20261023:85b6d9e3f8f9a07d7dab485c62b2590c07e6f867c128aa5f75306c516376fe5c","ContentHash":"6f58321c8fdfb0eda93ebde2a22b5cad980e3492d54c75b875d88a1ca0f47261","Payload":{"description":"Computes the mode, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values). The aggregated argument must be of a sortable type.","description_html":"Computes the \u003cem class=\"firstterm\"\u003emode\u003c/em\u003e, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values). The aggregated argument must be of a sortable type.","signatures":[{"description":"Computes the mode, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values). The aggregated argument must be of a sortable type.","description_html":"Computes the \u003cem class=\"firstterm\"\u003emode\u003c/em\u003e, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values). The aggregated argument must be of a sortable type.","description_zh":"计算众数，即聚合参数中出现次数最多的值（若多个值的出现次数相同且最多，则任意选择其中第一个）。聚合参数必须是可排序类型。","description_zh_html":"计算\u003cem class=\"firstterm\"\u003e众数\u003c/em\u003e，即聚合参数中出现次数最多的值（若多个值的出现次数相同且最多，则任意选择其中第一个）。聚合参数必须是可排序类型。","examples":[],"html":"\u003ccode class=\"function\"\u003emode\u003c/code\u003e () \u003ccode class=\"literal\"\u003eWITHIN GROUP\u003c/code\u003e ( \u003ccode class=\"literal\"\u003eORDER BY\u003c/code\u003e \u003ccode class=\"type\"\u003eanyelement\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eanyelement\u003c/code\u003e","returns":"anyelement","text":"mode () WITHIN GROUP ( ORDER BY anyelement ) → anyelement","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"b150907673ebb0fbefdde2341914ccf57dca0d468c554d10392e2e5fa65da0d7","Text":"mode () WITHIN GROUP ( ORDER BY anyelement ) → anyelement","Returns":"anyelement","Payload":{"description":"Computes the mode, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values). The aggregated argument must be of a sortable type.","description_html":"Computes the \u003cem class=\"firstterm\"\u003emode\u003c/em\u003e, the most frequent value of the aggregated argument (arbitrarily choosing the first one if there are multiple equally-frequent values). The aggregated argument must be of a sortable type.","description_zh":"计算众数，即聚合参数中出现次数最多的值（若多个值的出现次数相同且最多，则任意选择其中第一个）。聚合参数必须是可排序类型。","description_zh_html":"计算\u003cem class=\"firstterm\"\u003e众数\u003c/em\u003e，即聚合参数中出现次数最多的值（若多个值的出现次数相同且最多，则任意选择其中第一个）。聚合参数必须是可排序类型。","examples":[],"html":"\u003ccode class=\"function\"\u003emode\u003c/code\u003e () \u003ccode class=\"literal\"\u003eWITHIN GROUP\u003c/code\u003e ( \u003ccode class=\"literal\"\u003eORDER BY\u003c/code\u003e \u003ccode class=\"type\"\u003eanyelement\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eanyelement\u003c/code\u003e","returns":"anyelement","text":"mode () WITHIN GROUP ( ORDER BY anyelement ) → anyelement","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
