🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Classify orders with the ordered products

User: "DaHumma"
New Altair Community Member
Updated by Jocelyn
Hey guys,

I'm new here and I have a little problem. I have a set of data where the UserID, the order number, the ordered articles and the articles gender (female, male, unisex). I want to see, for which gender the user buys products. Because i have one column per article, i want to compare the genders of those articles in the matching order number and generate a new attribute in which the whole order number get's the most bought gender in this order for the whole order number.
I tried to aggregate the order numbers and count the amount, a specific gender is in that order. 
Now the problem is, how to generate the attributes, that match the order number, maybe you guys can help me?

Here is an example for the table:

UserID; ordernumber; article; gender

a; 10; 1234; female
a; 10; 1233; female
a; 10; 1245; unisex
b; 11; 1324; male
c; 12; 1324; male
c; 12; 1325; male
c; 12; 1223; female
d; 13; 1234; female
d; 12; 1245; unisex
Sort by:
1 - 1 of 11
    User: "kayman"
    New Altair Community Member
    Accepted Answer
    Could you show the expected outcome in sort of dummy format? This way it's a bit easier to understand what you want to achieve.