I'm trying to analyze a shoe sales data, but I'm having a hard time creating a function to find the number that the customer bought the most in the previous year.
I have a table with this data:
Cód. Cliente CPF Nome Sexo Tamanho
5879099 37513584800 LOJA MASCULINO 35
5879099 37513584800 LOJA MASCULINO 23
5879099 37513584800 LOJA MASCULINO 17
5879099 37513584800 LOJA MASCULINO 37
5879099 37513584800 LOJA MASCULINO 17
3353800 2613618809 DULIO JOSE DE SOUSA DAMICO MASCULINO 35
3353800 2613618809 DULIO JOSE DE SOUSA DAMICO MASCULINO 39
3112300 29953652805 ROSANA DA SILVA FAGUNDES FEMININO 34
6116202 39285701884 ANA CAROLINA DE FARIAS FRANCISCO FEMININO 31
The table is much more than just a few lines.
Well, what I need to know is what is the most repeated size per customer's CPF.
What number did he buy the most?
I could not find a way to do this, if someone has a light.
Thanks,