I have a table such as the following
id_profile, id_user
1 , 5
1 , 4
1 , 4
1 , 4
2 , 1
2 , 5
2 , 2
I'm trying to count id_user but I have to eliminate duplicates. So, I want a result like
id_profile, count
1 , 2
2 , 3
Any suggestions?