My table looks like this:
Username Referredby foobar foobar2 foobar lolcat foobar catcat lolcat
What I want: a list of the top referrers, and how many people they have referred.
Do I need to do a self join or something?
It think you’d be okay with:
select Referredby, count(*) from thistable group by Referredby order by cnt desc;
Answered By – ethrbunny
Answer Checked By – Katrina (BugsFixing Volunteer)