SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)
HP NonStop SQL/MX Release 3.2.1 Reference Manual—691117-004
8-1
8
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 8-1
•
Character String Functions on page 8-2
•
Datetime Functions on page 8-4
•
Mathematical Functions on page 8-5
•
Sequence Functions on page 8-7
•
Other Functions and Expressions on page 8-8
For more information on SQL value expressions, see Expressions on page 6-41.
Table-valued stored functions cannot be used within an SQL value expression. See
Table-Valued Stored Functions on page 8-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 8-14
Computes the average of a group of numbers derived from the
evaluation of the expression argument of the function.
COUNT Function
on
page 8-38
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 8-103
Determines a maximum value from the group of values derived
from the evaluation of the expression argument.
MIN Function
on
page 8-104
Determines a minimum value from the group of values derived
from the evaluation of the expression argument.
STDDEV Function
on
page 8-171
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 8-176
Computes the sum of a group of numbers derived from the
evaluation of the expression argument of the function.
VARIANCE Function
on
page 8-207
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.










