I have two tables, one called "users" other called "referral". Every user has a code associated with it and this is how they look:
USERS T