pgsql group by
时间: 2023-09-10 21:10:21 浏览: 121
【GROUP_CONCAT】使用之MySQL官方文档翻译
在PostgreSQL中,GROUP BY语句用于对查询结果进行分组,以便对每个分组应用聚合函数。从9.5版本开始,PostgreSQL引入了GROUP BY的分组集合功能,提供了GROUPING SETS、CUBE和ROLLUP参数,使用方式与Oracle完全一致。 SELECT查询中各子句的顺序如下图所示。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [【PostgresSQL】分组统计后计算所有组的总和](https://blog.csdn.net/hutuyaoniexi/article/details/124040209)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [【0005】 详聊PostgreSQL中 GROUP BY(分组)的使用](https://blog.csdn.net/lixiaogang_theanswer/article/details/103371863)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文