From
(
-- Name department salary
Values
('Zhang san', 'marketing Department ', 2000 ),
('Zhao hong', 'Technology Department ', 2400 ),
('Li si', 'marketing Department ', 3000 ),
('Li Bai ', 'Technology Department', 3200 ),
('Wang 5', 'marketing Department ', 4000 ),
('Wang Lan', 'Technology Department ', 5000)
) As employ (name, DEPT, salary );
The query result is as follows:
Name salary lag0 lag1 lag2 lag3 lag4 lead
Zhang San 2000 2000 (null) 0-1 2400
Zhao Hong 2400 2400 200
OLAP is an important function in DB2 that extends the relational model and enables the relational model to understand the sorting methods in the row set. This article will analyze OLAP functions in detail, the related instances are provided for your reference.
Sort functions
Some practical tips for using OLAP functions
The online analytical Processing,olap function is very flexible and powerful. By using these functions, you can find a simple solution for some problems that are either to iterate over one or more cursors, or to be recursive. In some other cases, it is much easier to use
improve performance and ease of use, so as to help users achieve on-demand information utilization.
You can use DWE to build a complete data warehouse solution, including highly scalable relational databases, data access functions, business intelligence analysis, and front-end analysis tools. DWE integrates Core Components for warehouse management, data mining, OLAP, and inline analysis and reporting.
than 100 built-in financial, statistical, or mathematical functions to perform complex trend analysis, create ratios, and distribute situations.
The DB2 OLAP server supports simultaneous access and simultaneous updates for multiple users, while at the same time maintaining the integrity of the data through the security of the letter-level safeguards. You can ef
report in just a minute-determine which dimensions should be set in the row, column, or filter area
Radarcube ASP Silverlight mdash; visualize OLAP data in tabular and graphical formatFeatures:
Supports any type of data source, such as databases, files, and so on. Multidimensional data sources that support SQL Server Analysis Services cubes
Create calculated measures for different types (measure values based on row-table, custom ag
My colleague asked a very simple question: how can I retrieve the minimum value of another column in each partition?
create table t1 (int c1, int c2);
If the partition is based on C2, 0-10, 10-20, 20-30, 30-40, 40-50
insert into t1 values(101, 1);insert into t1 values(102, 2);insert into t1 values(111, 11);insert into t1 values(112, 12);insert into t1 values(121, 21);insert into t1 values(122, 22);insert into t1 values(131, 31);insert into t1 values(132, 32);insert into t1 values(133,
Oracle OLAP FunctionsThis topic has been used a lot recently. I have summarized it.
Syntax: function_name (,,...)Over ()
OLAP function Syntax: 1. The function itself is used to operate the data in the window. 2. Partitioning clause is used
Div: eq (0)> Div: eq (3)> table: eq (2)> tbody: eq (0)> TR: eq (0)> TD: eq (0)> Div: eq (0)> # Content: eq (0)> Br: eq (6) " anchortype=" previous " jquery12348
The following articles mainly introduce the comparison between common DB2 functions and Oracle functions. If you are curious about common DB2 functions and Oracle functions, this article will unveil the secrets of this article, th
This article mainly describes the comparison between common DB2 functions and Oracle functions, including descriptions of type conversion functions, time and date, string functions, and mathematical functions, the following is a d
DB2 column functions are one of our most commonly used functions. They calculate a group of values in the column to obtain a single result value. Let's take a look at the DB2 column functions.
DB2 column
Oracle
How to present Oracle's relative functions in DB2 (III.)
Author:ccbzzp
In reality, you may often encounter some of the functions of Oracle in DB2,
Here I simply conclude that there may be many ways in which a function can be found, not all of which are listed here,
Welcome to all of you to continue, in order to
The following article describes how DB2 implements the functions of Oracle databases and summarizes its experience in actual operations, in this article, I will share with you some tips and experiences on implementing certain Oracle functions in DB2 ......
In practical applications, you may often encounter how to impl
Oracle
How to present Oracle's related functions in DB2 (IV.)
Author:ccbzzp
In reality, you may often encounter some of the functions of Oracle in DB2,
Here I simply conclude that there may be many ways in which a function can be found, not all of which are listed here,
Welcome to all of you to continue, in order to sh
Oracle
How to present Oracle's related functions in DB2 (i)
Author:ccbzzp
In reality, you may often encounter some of the functions of Oracle in DB2,
Here I simply conclude that there may be many ways in which a function can be found, not all of which are listed here,
Welcome to all of you to continue, in order to shar
When you store multilingual data in a DB2 UDB database, Unicode is often the only encoding that adapts to the entire range of data. DB2 can store and process Unicode data, but its sorting function is limited to binary ordering and three cultural sorts. In addition, a database can have only one collation, which is determined when the database is created. These sorting restrictions are an obvious challenge fo
The following articles mainly describe the types of commonly used DB2 functions. I saw the types of commonly used DB2 functions on the relevant website two days ago. I think it is quite good. I will share them with you, the following is a detailed description of the relevant content, hoping to help you in this regard.
Tags: data string art table name forRecently with DB2, the difference between the database is still very large, a lot of functions are not the same1. Go to Space*DB2: Ltrim () is to go to the left space, RTrim () is to go to the right space.*informix: Trim () is the space to go.Usage: Example: string a= "abc";*DB2: Ltr
The following articles mainly describe the type conversion functions of common DB2 functions. If you are interested in the type conversion functions described in common DB2 functions, you can click the following articles to view t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.