Total sum of a column by Group using column expressions (without join back or using group loop)

Hi friends

I would like to calculate the total of a column by category without using the joiner node. My curiosity is how to execute this using column expressions to mimic the WINDOWs FUNCTIONS like SQL.

Yes, I know it should be possible to do this using Python or Java Snippet.

I’m studying SQL (Postgres), and since I use column expressions a lot, I was curious to know if it’s possible to do it through them or any node that doesn’t depend on the group loop.

In SQL (postgres)

it is possible to use do the function OVER () , with PARTITION ()

And achieve powerful results.

In this example I’m using “avg” instead “sum”. Is the sum all all values.

I could, group by any categories’ em bring the average, and bring the avg of the a column with a filter inside. Example: the sum of column where the year is greater than 2000.

Well, in Knime, I could do some “group loop”, and the result of the sum, store into a variable and print in the table, using joiner etc…

It’s possible to mimic, like SQL in one “simple” code?

I imagine that I will have to use group loop, or variable, joiner, but this post is for curiosity, learning.

Let’s go to a simple example for Knime:

Simple example

*“More advance”*