Below is my scenario and my expected output. I don’t know if what I am trying to achieve is straightforward or not.
I have two tables, users, and articles
Every author gets to have a unique code associated with them, and this code can be used to refer other authors into the system ( like an affiliate code ). So in the example above 3 and 5 get to use affiliate code of 1 and 4 gets to use the code of 2.
Now when they write articles it can be in published or draft state. And each published article is 1point.
So I want to calculate points against each of the author for the articles their affiliates have written and published.
Author 1 has 2 affiliates who have used his code and they have published 4 articles = 4 points
Author 2 has 1 affiliate who has used his code and he has published 1 article = 1 point
Author 6 gets to use Author 4’s Affiliate code and he has published 1 article so Author 4 gets 1 point.
Now how do I generate this point system.
@Robert_Petitto Saw your recent video so many times both on YT and here on the forum and am not able to link the two tables to get the number that I want. Probably something that might look easy for you? I was breaking my head about it for a long while but today’s video of you pushed me to post this hoping they might be on the same lines.
Thanks in advance and apologies for directly tagging you in the post for an answer.