Download SQL Users` Manual - ALTIBASE Customer Support

Transcript
Aggregate Functions
iSQL> SELECT MIN(price) FROM goods;
MIN(PRICE)
-------------966.99
1 row selected.
STDDEV
Syntax
STDDEV ([ALL | DISTINCT] expression)
Description
STDDEV returns standard deviation of expression.
The returned value may have a bias depending on the accumulated calculation bias by the system
mathematical function.
Examples
<Query> Calculate standard deviation of the wage amounts in the employee table.
iSQL> SELECT STDDEV(salary) standard_deviation
FROM employee;
STANDARD_DEVIATION
--------------------797706.787
1 row selected.
SUM
Syntax
SUM ([ALL | DISTINCT] expression)
Description
SUM returns the sum of values of expression. You can use it as an aggregate or analytic function.
Examples
<Query> Calculate the sum of storage quantities of the Goods Table.
iSQL> SELECT SUM(stock) FROM goods;
SUM(STOCK)
----------------------379420
1 row selected.
SQL Users’ Manual
321