SQL/MX 2.x Reference Manual (H06.04+)

HP NonStop SQL/MX Reference Manual540440-003
9-1
9
SQL/MX Functions and Expressions
This section describes the syntax and semantics of specific functions and expressions
that you can use in NonStop SQL/MX statements. The functions and expressions are
categorized according to their functionality.
Categories
Use these types of functions within an SQL value expression:
Aggregate (Set) Functions on page 9-1
Character String Functions on page 9-2
Datetime Functions on page 9-4
Mathematical Functions on page 9-5
Sequence Functions on page 9-7
Other Functions and Expressions on page 9-8
For more information on SQL value expressions, see Expressions on page 6-37.
Table-valued stored functions cannot be used within an SQL value expression. See
Table-Valued Stored Functions on page 9-9.
Aggregate (Set) Functions
An aggregate (or set) function operates on a group or groups of rows retrieved by the
SELECT statement or the subquery in which the aggregate function appears.
AVG Function on
page 9-14
Computes the average of a group of numbers derived from the
evaluation of the expression argument of the function.
COUNT Function
on
page 9-32
Counts the number of rows that result from a query (by using *) or
the number of rows that contain a distinct value in the one-column
table derived from the expression argument of the function
(optionally distinct values).
MAX Function
on
page 9-81
Determines a maximum value from the group of values derived
from the evaluation of the expression argument.
MIN Function
on
page 9-82
Determines a minimum value from the group of values derived
from the evaluation of the expression argument.
STDDEV Function
on
page 9-142
Computes the statistical standard deviation of a group of numbers
derived from the evaluation of the expression argument of the
function. The numbers can be weighted.
SUM Function
on
page 9-147
Computes the sum of a group of numbers derived from the
evaluation of the expression argument of the function.
VARIANCE Function
on
page 9-166
Computes the statistical variance of a group of numbers derived
from the evaluation of the expression argument of the function.
The numbers can be weighted.