[L2-DS] Knowledge Check: Workflow Control: Group loop aggregated metrics


May I be so bold as to partly not agree with your solution.

Maybe, it is just a subtlety that makes my wrong choice wrong, but your description of the solution is to me the count of orders. If you tell me to get the count of customers, I would always retrieve the count of distinct customers. I do not see any point in telling my business that there were 5 customers having paid with debit card, when two of the orders were paid by the same customer. I am not entirely sure that a single group by would suffice to count distinct customers (in SQL I know I can, but in KNIME I miss the “distinct” checkbox of the count aggregation).

The choice of yours I did not tick, to me, can be done easily with a single group by. As it is the aggregation over two columns, I would prepend a math node to equate the sum of the two columns into a column of its own. Then, there is no problem to use a single group by. I, actually, was not able to get my head around to a solution with a group loop.

Kind regards


Can you also post the question?

1 Like

@Thiemo.Kellner the group by node should support all kinds of aggregations including counting unique values

1 Like

Ok, now I have found the distinct. I did not expect another dialogue for a mere flag.

It is from https://knime.learnupon.com/enrollments/127590849/page/503105098

Option two you can also solve without looping, that is a nice challenge :slight_smile:

Yes, but can one without a second group by?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.