壹佰网|ERP100 - 企业信息化知识门户

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1189|回复: 3

问问在admin tool中,编辑公式的时候,出现的函数rmax是按摩意思,怎么用??

[复制链接]
发表于 2012/10/21 10:35:17 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622  。

您需要 登录 才可以下载或查看,没有帐号?注册

x
QQ截图20121021104516.png ,如题,,,请举个例子,,,O(∩_∩)O谢谢


该贴已经同步到 xxmm的微博
发表于 2012/10/21 14:43:28 | 显示全部楼层
RMAX
This function takes a set of records as input and shows the maximum value based on records encountered so far. The specified data type must be one that can be ordered.
This function resets its values for each group in the query according to the rules described in Display Function Reset Behavior.
Syntax:
RMAX (expression)
Where:

expression
An expression of any data type. The data type must be one that has an associated sort order.

Example:
The following example shows a query that uses the RMAX function and the query results.
select month, profit, RMAX(profit) from sales_subject_area
MONTH
PROFIT
RMAX (profit)
JAN
100.00
100.00
FEB
200.00
200.00
MAR
100.00
200.00
APRIL
100.00
200.00
MAY
300.00
300.00
JUNE
400.00
400.00
JULY
500.00
500.00
AUG
500.00
500.00
SEPT
500.00
500.00
OCT
300.00
500.00
NOV
200.00
500.00
DEC
100.00
500.00

发表于 2012/10/21 14:44:18 | 显示全部楼层

Running Aggregate Functions

Running Aggregate Functions
Running aggregate functions are similar to functional aggregates in that they take a set of records as input, but instead of outputting the single aggregate for the entire set of records, they output the aggregate based on records encountered so far.
This section describes the running aggregate functions supported by the Oracle BI Server.
Mavg
Calculates a moving average (mean) for the last n rows of data in the result set, inclusive of the current row.
Syntax:
MAVG (n_expression, n)
where:

n_expression
Any expression that evaluates to a numerical value.
n
Any positive integer. Represents the average of the last n rows of data.

The MAVG function resets its values for each group in the query, according to the rules outlined in Display Function Reset Behavior.
The average for the first row is equal to the numeric expression for the first row. The average for the second row is calculated by taking the average of the first two rows of data. The average for the third row is calculated by taking the average of the first three rows of data, and so on until you reach the nth row, where the average is calculated based on the last n rows of data.
MSUM
This function calculates a moving sum for the last n rows of data, inclusive of the current row.
The sum for the first row is equal to the numeric expression for the first row. The sum for the second row is calculated by taking the sum of the first two rows of data. The sum for the third row is calculated by taking the sum of the first three rows of data, and so on. When the nth row is reached, the sum is calculated based on the last n rows of data.
This function resets its values for each group in the query according to the rules described in Display Function Reset Behavior.
Syntax:
MSUM (n_expression, n)
Where:

n_expression
Any expression that evaluates to a numerical value.
n
Any positive integer. Represents the sum of the last n rows of data.

Example:
The following example shows a query that uses the MSUM function and the query results.
select month, revenue, MSUM(revenue, 3) as 3_MO_SUM from sales_subject_area
MONTH
REVENUE
3_MO_SUM
JAN
100.00
100.00
FEB
200.00
300.00
MAR
100.00
400.00
APRIL
100.00
400.00
MAY
300.00
500.00
JUNE
400.00
800.00
JULY
500.00
1200.00
AUG
500.00
1400.00
SEPT
500.00
1500.00
OCT
300.00
1300.00
NOV
200.00
1000.00
DEC
100.00
600.00

RSUM
This function calculates a running sum based on records encountered so far. The sum for the first row is equal to the numeric expression for the first row. The sum for the second row is calculated by taking the sum of the first two rows of data. The sum for the third row is calculated by taking the sum of the first three rows of data, and so on.
This function resets its values for each group in the query according to the rules described in Display Function Reset Behavior.
Syntax:
RSUM (n_expression)
Where:

n_expression
Any expression that evaluates to a numerical value.

Example:
The following example shows a query that uses the RSUM function and the query results.
select month, revenue, RSUM(revenue) as RUNNING_SUM from sales_subject_area
MONTH
REVENUE
RUNNING_SUM
JAN
100.00
100.00
FEB
200.00
300.00
MAR
100.00
400.00
APRIL
100.00
500.00
MAY
300.00
800.00
JUNE
400.00
1200.00
JULY
500.00
1700.00
AUG
500.00
2200.00
SEPT
500.00
2700.00
OCT
300.00
3000.00
NOV
200.00
3200.00
DEC
100.00
3300.00

RCOUNT
This function takes a set of records as input and counts the number of records encountered so far.
This function resets its values for each group in the query according to the rules described in Display Function Reset Behavior.
Syntax:
RCOUNT (Expr)
Where:

Expr
An expression of any data type.

Example:
The following example shows a query that uses the RCOUNT function and the query results.
select month, profit, RCOUNT(profit) from sales_subject_area where profit > 200.
MONTH
PROFIT
RCOUNT (profit
MAY
300.00
2
JUNE
400.00
3
JULY
500.00
4
AUG
500.00
5
SEPT
500.00
6
OCT
300.00
7

RMAX
This function takes a set of records as input and shows the maximum value based on records encountered so far. The specified data type must be one that can be ordered.
This function resets its values for each group in the query according to the rules described in Display Function Reset Behavior.
Syntax:
RMAX (expression)
Where:

expression
An expression of any data type. The data type must be one that has an associated sort order.

Example:
The following example shows a query that uses the RMAX function and the query results.
select month, profit, RMAX(profit) from sales_subject_area
MONTH
PROFIT
RMAX (profit)
JAN
100.00
100.00
FEB
200.00
200.00
MAR
100.00
200.00
APRIL
100.00
200.00
MAY
300.00
300.00
JUNE
400.00
400.00
JULY
500.00
500.00
AUG
500.00
500.00
SEPT
500.00
500.00
OCT
300.00
500.00
NOV
200.00
500.00
DEC
100.00
500.00

RMIN
This function takes a set of records as input and shows the minimum value based on records encountered so far. The specified data type must be one that can be ordered.
This function resets its values for each group in the query according to the rules described in Display Function Reset Behavior.
Syntax:
RMIN (expression)
Where:

expression
An expression of any data type. The data type must be one that has an associated sort order.

Example:
The following example shows a query that uses the RMIN function and the query results.
select month, profit, RMIN(profit) from sales_subject_area
MONTH
PROFIT
RMIN (profit)
JAN
400.00
400.00
FEB
200.00
200.00
MAR
100.00
100.00
APRIL
100.00
100.00
MAY
300.00
100.00
JUNE
400.00
100.00
JULY
500.00
100.00
AUG
500.00
100.00
SEPT
500.00
100.00
OCT
300.00
100.00
NOV
200.00
100.00
DEC
100.00
100.00

 楼主| 发表于 2012/10/22 19:39:40 | 显示全部楼层
额,,,头痛的英语啊,认真看
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|手机版|壹佰网 ERP100 ( 京ICP备19053597号-2 )

Copyright © 2005-2012 北京海之大网络技术有限责任公司 服务器托管由互联互通
手机:13911575376
网站技术点击发送消息给对方83569622   广告&合作 点击发送消息给对方27675401   点击发送消息给对方634043306   咨询及人才点击发送消息给对方138011526

GMT+8, 2025/11/29 22:13 , Processed in 0.022317 second(s), 18 queries , File On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表