Ksql: Need SQL Average (AVG) Aggregation Function

Created on 6 Apr 2018  路  7Comments  路  Source: confluentinc/ksql

Trying to figure out average of X within a given window for a BI visualization. KSQL supports MAX, MIN, .... but why not AVG?

Super common BI use case.

enhancement

Most helpful comment

A richer set of built-in functions is in the works, though no concrete date for that yet.

All 7 comments

Until an AVG is implemented you can use SUM and COUNT e.g. SELECT x, SUM(y) / COUNT(*) FROM foo GROUP BY x;

Thanks @rodesai, so this is on the roadmap?

A richer set of built-in functions is in the works, though no concrete date for that yet.

Contributions are welcome, @tomlinsonr :)

A richer set of built-in functions is in the works, though no concrete date for that yet.

That would be great. Looking forward!!

Is there a more specific date for the richer set of built-in functions @rodesai ?

Or is there maybe a third-party repo with custom UDFs that includes AVG and other functions to make SQL even more fun (such as LAST, FIRST, LAG, etc)?

@holgerbrandl - take a look at #3302! The next release should have average and the ability to build more complicated custom UDFs thanks to @vpapavas

Was this page helpful?
0 / 5 - 0 ratings

Related issues

selvakumarEsra picture selvakumarEsra  路  4Comments

apurvam picture apurvam  路  4Comments

bhargav516 picture bhargav516  路  3Comments

rmoff picture rmoff  路  3Comments

utkarshsaraf19 picture utkarshsaraf19  路  4Comments