首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    Oracle 中运用rollup和cube实现汇总运算

    一、group by  rollup函数解析 1、对于数据的汇总,是数据库经常用到的任务之一,本文讲的就是其中的一种rollup和cube实现数据汇总 2、实例讲解 CREATE TABLE TEST8...进行分组统计 UNION select null orderid,null productid,price,count(orderid) from test8 group by price --4、按照产品价格进行分组统计...UNION select orderid,null productid,price,count(orderid) from test8 group by orderid,price --6、按照订单id和产品价格进行统计...select null orderid,productid,price,count(orderid) from test8 group by productid,price --7、按照产品id和产品价格进行统计...orderid,productid,price,count(orderid) from test8 group by orderid,productid,price) --8、按照订单id和产品id和产品价格进行统计

    79070
    领券