Here is my original query:
select sponsor, count(sponsor) as total from users group by sponsor order by total desc;
In the image below you will see that sponsor 0 has 9525. This means there are 9525 that signed up on the website without using a referral address.
The next user, 110, has had 1874 users signup because of his referral address, etc. Out of all the queries suggested on this thread, this is the only one that at least produces the correct total for each sponsor.
Now if we can somehow add the firstname, lastname so we can easily see what user is tied to uID 110, 121, 305, etc.