Skip Headers
Oracle® OLAP DML Reference
10g Release 2 (10.2)

Part Number B14346-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

MIN

The MIN function calculates the smaller value of two expressions.

Return Value

DECIMAL

Syntax

MIN(expression1expression2)

Arguments

expression1

One expression to be compared.

expression2

The other expression to be compared.

Notes

Dimensions of the Result Returned by MIN

Ordinarily, the dimensions of both the expressions you want to compare and the results of MIN are the same. When the dimensions of one expression are a subset of the other's dimensions, then the results of MIN are dimensioned by the larger set of dimensions. In any case, the results of MIN are dimensioned by the union of the dimensions of the two expressions.

Examples

Example 19-4 Calculating Whether Actual or Budget Values Are Smaller

Suppose, for each of the first six months of 1996, you want to find whether the actual value or the budget value is smaller for the line item Cost of Goods Sold (Cogs) in the Sporting division.

LIMIT line TO 'Cogs'
LIMIT division TO 'Sporting'
LIMIT month TO 'Jan96' TO 'Jun96'
REPORT DOWN month actual budget MIN(actual budget)

The preceding statements produce the following output.

DIVISION: SPORTING
               --------------LINE--------------
               --------------COGS--------------
                                        MIN    
                                      (ACTUAL  
MONTH            ACTUAL     BUDGET    BUDGET)  
-------------- ---------- ---------- ----------
Jan96          287,557.87 279,773.01 279,773.01
Feb96          315,298.82 323,981.56 315,298.82
Mar96          326,184.87 302,177.88 302,177.88
Apr96          394,544.27 386,100.82 386,100.82
May96          449,862.25 433,997.89 433,997.89
Jun96          457,347.55 448,042.45 448,042.45