categorize

hi guys,

İ have the data of the sales but i want to categorize the secteurs with the basket.

For exemple:

Command code:123123123

Basket:123,456,789

Dry food:123,456

Vegetabels:789

So i want to categorize the same basket with different secteurs for the costomers satisfation.İ want the output:

Commend code:123123123

Products:123,789 or Products:456,789

İf the product is the same secteur it doesnt matter whşch one are we piciking the target is to have the basket to have differents secteurs.İ try the task with the GROUP BY node but i thnk there is more