[#600] Add support for Oracle / SQL Standard linear regression

functions - Updated manual
This commit is contained in:
Lukas Eder 2012-10-26 11:20:41 +02:00
parent 0a8cb52427
commit 3df0420791

View File

@ -3279,32 +3279,43 @@ create.select(concat("A", "B", "C"));
</p>
<java><![CDATA[// Every-day, SQL standard aggregate functions
AggregateFunction<Integer> count();
AggregateFunction<Integer> count(Field<?> field);
AggregateFunction<T> max(Field<T> field);
AggregateFunction<T> min(Field<T> field);
AggregateFunction<BigDecimal> sum(Field<? extends Number> field);
AggregateFunction<BigDecimal> avg(Field<? extends Number> field);
AggregateFunction<Integer> count();
AggregateFunction<Integer> count(Field<?> field);
AggregateFunction<T> max (Field<T> field);
AggregateFunction<T> min (Field<T> field);
AggregateFunction<BigDecimal> sum (Field<? extends Number> field);
AggregateFunction<BigDecimal> avg (Field<? extends Number> field);
// DISTINCT keyword in aggregate functions
AggregateFunction<Integer> countDistinct(Field<?> field);
AggregateFunction<T> maxDistinct(Field<T> field);
AggregateFunction<T> minDistinct(Field<T> field);
AggregateFunction<BigDecimal> sumDistinct(Field<? extends Number> field);
AggregateFunction<BigDecimal> avgDistinct(Field<? extends Number> field);
AggregateFunction<Integer> countDistinct(Field<?> field);
AggregateFunction<T> maxDistinct (Field<T> field);
AggregateFunction<T> minDistinct (Field<T> field);
AggregateFunction<BigDecimal> sumDistinct (Field<? extends Number> field);
AggregateFunction<BigDecimal> avgDistinct (Field<? extends Number> field);
// String aggregate functions
AggregateFunction<String> groupConcat(Field<?> field);
AggregateFunction<String> groupConcat (Field<?> field);
AggregateFunction<String> groupConcatDistinct(Field<?> field);
OrderedAggregateFunction<String> listAgg(Field<?> field);
OrderedAggregateFunction<String> listAgg(Field<?> field, String separator);
// Statistical functions
AggregateFunction<BigDecimal> median(Field<? extends Number> field);
AggregateFunction<BigDecimal> stddevPop(Field<? extends Number> field);
AggregateFunction<BigDecimal> median (Field<? extends Number> field);
AggregateFunction<BigDecimal> stddevPop (Field<? extends Number> field);
AggregateFunction<BigDecimal> stddevSamp(Field<? extends Number> field);
AggregateFunction<BigDecimal> varPop(Field<? extends Number> field);
AggregateFunction<BigDecimal> varSamp(Field<? extends Number> field);]]></java>
AggregateFunction<BigDecimal> varPop (Field<? extends Number> field);
AggregateFunction<BigDecimal> varSamp (Field<? extends Number> field);
// Linear regression functions
AggregateFunction<BigDecimal> regrAvgX (Field<? extends Number> y, Field<? extends Number> x);
AggregateFunction<BigDecimal> regrAvgY (Field<? extends Number> y, Field<? extends Number> x);
AggregateFunction<BigDecimal> regrCount (Field<? extends Number> y, Field<? extends Number> x);
AggregateFunction<BigDecimal> regrIntercept(Field<? extends Number> y, Field<? extends Number> x);
AggregateFunction<BigDecimal> regrR2 (Field<? extends Number> y, Field<? extends Number> x);
AggregateFunction<BigDecimal> regrSlope (Field<? extends Number> y, Field<? extends Number> x);
AggregateFunction<BigDecimal> regrSXX (Field<? extends Number> y, Field<? extends Number> x);
AggregateFunction<BigDecimal> regrSXY (Field<? extends Number> y, Field<? extends Number> x);
AggregateFunction<BigDecimal> regrSYY (Field<? extends Number> y, Field<? extends Number> x);]]></java>
<p>
Here's an example, counting the number of books any author has written: