I have 3 tables:
sponsors
id | id_patrocinador | id_usuario
quotas
id | id_user | quantidade
users
id | nome | login
What I need to do is a TOP 10 where I list 10 users who have sponsored with active quotas. For example:
1 - João - 10 indicados ativos
2 - Maria - 9 indicados aitvos
...
I tried SELECT in a number of ways but could not get any right results.