ksqlDB Nested Aggregate Functions

Hi,

I want to get the sum of distinct values from my ksql table.
mysql equivalent: SUM(DISTINCT Price)

I couldn’t find Distinct Aggregate Function in the docs and I tried to reach the same conclusion with this query: SUM(TOPKDISTINCT(Price, COUNT_DISTINCT(Price))) but then I got this error that inditaces nested aggregates are completely forbidden :point_down:

Aggregate functions can not be nested: SUM(TOPKDISTINCT())

It looks like a basic sql query but is it possible to try this query against a ksql table?

Any info would be great.
Thanks in advance
Batu

This topic was automatically closed after 30 days. New replies are no longer allowed.