I have a table that looks like this – http://d.pr/jQ1P and then another table (let’s call it “actions” table) that contains a list of things that all users have done.
How can I write a query that can give me a count of how many new users referrer_id “1” has referred that also has at least 1 entry in the “actions” table? Eg. For referrer_id “1”, “1723” and “1724” both have at least 1 row in the “actions” table, but not “1725. So for user “1”, he has successfully referred 2 users, even though there’s also “1725”.
Hope that makes sense.
Here you go: