`

DB2 OLAP

    博客分类:
  • DB2
DB2 
阅读更多

1.OLAP函数 ROW_NUMBER  提供行号


 

select row_number() over (order by 字段) as row_no  from tabname


 

   查询表的第N行到第M行的数据

 

select a.* from 
(
     select row_number() over (order by 字段) as row_no,a.* from tabname a
)T
where t.row_no between 1 and 100

 

 2.OLAP查询

 

    累计一个星期内每天的销售数字

 

sum(sum(?)) over (partition by week order by date rows unbounded preceding) as 

 

    OLAP分割:    partition by

    row n preceding 窗口帧

    n=2表示当前行加上前两行,计算的是第三行的数据

 

3.OLAP RANK函数

   

RANK() OVER (partition by dept order by dollors desc nulls last )AS RANK

   

    RANK                      1,2,2,4              

    DENSE_RANK         1,2,2,3

    ROW_NUMBER       1,2,3,4

 

    按部门分割,降序,若有空值将被排到后面

 

分享到:
评论

相关推荐

    ibm DB2 OLAP 安装和使用指南

    一个IBM DB2 OLAP安装手册 介绍了IBM DB2 OLAP基础安装

    DB2 OLAP Server - 理论与实践

    DB2 OLAP Server - 理论与实践

    db2 olap服务器理论与实践part1

    db2 olap服务器理论与实践part1 很有用的东东

    DB2中OLAP函数

    DB2中OLAP函数。电子文档里面有详细介绍!对学习开窗函数有很好的帮助。联机分析处理OLAP是一种软件技术,它使分析人员能够迅速、一致、交互地从各个方面观察信息,以达到深入理解数据的目的。

    IBM OLAP redbook -- business intelligence

    In this part of the book, we take you through an overview of the DB2 OLAP Server V8.1 new advanced functions and describe how to combine the different components. Furthermore, we discuss an ...

    DB2 数据仓库 OLAP 服务

    IBM:registered: DB2:registered: Data Warehouse Edition(DWE)为 OLAP 解决方案开发人员和信息消费者提供了一套全面的 OLAP 工具。本文将介绍 IBM DB2 Data Warehouse Enterprise Edition 9.1 提供的 OLAP 服务,...

    (开发人员应当读的文章)Bob Lyle 谈 DB2 中的 OLAP 函数

    (开发人员应当读的文章)Bob Lyle 谈 DB2 中的 OLAP 函数

    IBM商业智能解决方案

    商业智能的手段主要在三方面:抽取,分析及发掘,IBM在这三方面都提出了强有力的工具:Warehouse Manager (数据仓库管理器)、DB2 OLAP Server (DB2多维服务器)、Intelligent Miner (数据挖掘)。

    Data warehouse document from IBM

    In this part of the book, we take you through an overview of the DB2 OLAP Server V8.1 new advanced functions and describe how to combine the different components. Furthermore, we discuss an ...

    DB2技术参考大全.rar

    本书描述了IBM的商业智能特性,其中包括数据仓库和OLAP。  本书是由DB2开发队伍的成员撰写,深入探讨了DB2这个强大高效的数据库管理系统。不管您是DB2应用程序的开发者还是数据库管理员,本书都将使您受益匪浅!

    DB2 技巧.doc

    1. Client can not connect Olap Server. 8 2. Load不能完成,返回代码:SQL6001N; Import可以做。 8 3. 连接DB2时,报NamedPipe出错。 8 4. Load失败,吊死数据库 8 5. 症状:备份挂起(Backup Pending) 9 6. 数据库...

    DB2-730中文教材--适合数据库开发人员以及对数据库有兴趣的人

    本教程介绍 DB2 9 产品和工具的基本知识,以及描述不同类型的数据应用程序、数据仓库和 OLAP 的概念。 • 第 2 部分:安全性 本教程介绍与 DB2 9 相关的身份验证、授权和特权概念。您应该具备数据库概念和操作系统...

    db2 9 730 中文教程

    本教程介绍 DB2 9 产品和工具的基本知识,以及描述不同类型的数据应用程序、数据仓库和 OLAP 的概念。 • 第 2 部分:安全性 本教程介绍与 DB2 9 相关的身份验证、授权和特权概念。您应该具备数据库概念和操作系统...

    教你如何构建DB2 Cube View元数据桥

    象DB2 UDB这样的高可升级性的数据库服务器扮演一个越来越重要的角色,传送企业OLAP解决方案。使用DB2 Cube View,DB2 UDB提供一个更加强健的基础结构,能够在端对端的的数据仓库和业务智能配置中承担起大量数据的...

    DB2-730中文教材-WATCH-watch.pdf

    本教程介绍DB2 产品和工具的基本知识,以及描述不同类型的数据应用程序、数据仓库和 OLAP 的概念

    DB2上机操作指南.rar

    DB2 Parallel Edition V1.2和DB2 Common Server V2.1.2的结合使DB2拥有丰富的功能不仅具有从膝上型电脑到巨型并行系统、支持大量并行事务的处理能力,而且能支持联机分析或OLAP处理。OLAP处理是以在数据仓库、数据...

    DB2教程 符合初学者使用

    本教程介绍了 DB2 产品和工具的基础知识,以及数据仓库和 OLAP 的概念。它是本系列教程(共六篇)的第一篇,该系列旨在帮助您准备 DB2 UDB V8.1 Family Fundamentals Certification(考试 700)考试。本教程中的资料...

    IBM DB2 FUNDAMENTALS

    IBM DB2 系统基础知识介绍 This tutorial introduces you to the...OLAP. This is the first in a series of seven tutorials to help you prepare for the DB2 9 for Linux, UNIX, and Windows Fundamentals exam 730.

    几大数据仓库方案特性比较

    IBM公司提供了一套基于可视数据仓库的商业智能(BI)解决方案,包括:Visual Warehouse(VW)、Essbase/DB2 OLAP Server 5.0、IBM DB2 UDB,以及来自第三方的前端数据展现工具(如BO)和数据挖掘工具(如SAS)...

    SQL袖珍参考手册(第3版)

    OLAP Functions Pivoting and Unpivoting Predicates Recursive Queries Regular Expressions Selecting Data String Functions Subqueries Tables, Creating Tables, Dropping Tables, Modifying Transaction ...

Global site tag (gtag.js) - Google Analytics