DEV Community

AntDB
AntDB

Posted on

AntDB-Oracle Compatibility Developer’s Manual P3–59

REGR_AVGY

regr_avgy(y, x) actually calculates the average of y (mathematical expectation), x has no role here.

REGR_SXX

The return value is equal to REGR_COUNT(expr1, expr2) * VAR_POP(expr2) .

REGR_SYY

The return value is equal to REGR_COUNT(expr1, expr2) * VAR_POP(expr1) .

REGR_SXY

The return value is equal to REGR_COUNT(expr1, expr2) * COVAR_POP(expr1, expr2) .

STDDEV

Calculates the standard deviation of the current row about the group.

Example:

Example returns the cumulative standard deviation of salary values for department 30 sorted by date of hire.

select ename,hiredate,sal,stddev(sal) over(order by hiredate) a from emp where deptno=20; ENAME | HIREDATE | SAL | A -------+---------------------+------+------------------- SMITH | 1980-12-17 00:00:00 | 4800 | 1414.213562373095 SMITH | 1980-12-17 00:00:00 | 6800 | 1414.213562373095 JONES | 1981-04-02 00:00:00 | 7975 | 1605.264775667865 FORD | 1981-12-03 00:00:00 | 8000 | 1503.935808692202 SCOTT | 1987-04-19 00:00:00 | 8000 | 1393.24262065155 ADAMS | 1987-05-23 00:00:00 | 8100 | 1309.428946780491 (6 rows) 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)