I am new to KNIME but I was using SQL language so far.
So I would like to implement this SQL query in KNIME
count distinct Custmer_id as cst_cnt,
count distinct Order_id as ord_cnt,
GROUP BY CUBE ( Country, Month, Segment, Channel);
what is the equivalent in KNIME nodes?
Thank you so much for your reply.
Hopefully my reply to your other related question helps here as I don’t know of a built in way of doing this
I’m hoping that this might assist. I don’t know of a trivial method of creating a cube dataset in KNIME, so I went for a non-trivial method and (hopefully) built one.
I have uploaded a demo workflow to the hub, using a copy of your test dataset which I cleaned (removing errant spaces in the type column) and stored in the demo dataflow as a csv.
It makes use of a component I’ve created for the purpose, and is hopefully therefore reusable (but I advise some thorough test…
Let’s continue the conversation in your other thread:
I am completely new to KNIME and I wish to do an sql cube statement in KNIME.
My workflow contains data tables and any SQL editor would not work.
I could do multiple “group by” nodes and then append the datasets but I have 8 columns - and this leads us to 27 combination).
Is there a more simple and efficient way to calculate what is called cube (subtotals per column)?
Thank you so much!
Closing this one as a duplicate.