oracle中group by with rollup
时间: 2023-11-09 16:19:41 浏览: 180
在Oracle中,使用group by语句可以对数据进行分组统计。而通过结合rollup关键字,可以在分组统计的基础上再次进行汇总统计,即在每个分组下都会有统计汇总。 举个例子,如果我们使用"group by rollup(id)",那么将会对id进行分组统计,并在每个分组下还会进行一次总计。这样可以得到更详细的统计结果。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Oracle Group By 用法之 —— Rollup](https://blog.csdn.net/weixin_39649478/article/details/116469600)[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* [oracle 中 group by rollup(id)与mysql 的 group by with rollup id](https://blog.csdn.net/kang1011/article/details/106437125)[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 ]
阅读全文