6 SQL Functions and Expressions
This section describes the syntax and semantics of specific functions and expressions that you
can use in Neoview SQL 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"
•
"Character String Functions"
•
"Datetime Functions"
•
"Mathematical Functions"
•
"Sequence Functions"
•
"Other Functions and Expressions"
For more information on SQL value expressions, see
Standard Normalization
For datetime functions, the definition of standard normalization is: If the ending day of the
resulting date is invalid, the day will be rounded DOWN to the last day of the result month.
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" (page 293)
"COUNT Function" (page 310)
"MAX/MAXIMUM Function" (page 361)
"MIN Function" (page 362)
"STDDEV Function" (page 409)
"SUM Function" (page 413)
"VARIANCE Function" (page 430)
Note that columns and expressions can be arguments of an aggregate function. The expressions
cannot contain aggregate functions or subqueries.
An aggregate function can accept an argument specified as DISTINCT, which eliminates duplicate
values before the aggregate function is applied. See
If you include a GROUP BY clause in the SELECT statement, the columns you refer to in the
select list must be either grouping columns or arguments of an aggregate function. If you do not
"Expressions" (page
Computes the average of a group of numbers derived
from the evaluation of the expression argument of the
function.
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).
Determines a maximum value from the group of values
derived from the evaluation of the expression argument.
Determines a minimum value from the group of values
derived from the evaluation of the expression argument.
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.
Computes the sum of a group of numbers derived from
the evaluation of the expression argument of the function.
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.
"DISTINCT Aggregate Functions" (page
208).
152).
Categories
279
Need help?
Do you have a question about the Neoview SQL and is the answer not in the manual?