Find Jobs
Hire Freelancers

PHP Count/Group By Top Occurrences Of Data In mySQL

$30-100 USD

Completed
Posted about 16 years ago

$30-100 USD

Paid on delivery
Basically this is what I need... I already have users in a database who are each given a unique id number (1-whatever). These people refer others to my site through their id number and when they do, their id number, the name, email address of anyone they refer and datetime is also stored in the same database but in a different table. I need a way to list who has referred the most people along with the number of people they have referred. For example... If I click a button that says... "Show Me The Top 10 Referrers", the php code you write would query my database and list the top ten people who have the most number of referrals associated with their id numbers. The output should be something like... First Place: John has referred 93 people Second Place: Jane has referred 75 people Third Place: Steve has referred 73 people etc If more than one person has the exact same number of referrals, they should be given the same position. For example... First Place: John has referred 93 people Second Place: Jane has referred 75 people Third Place: Steve has referred 73 people Third Place: Jesse has referred 73 people Third Place: Tom has referred 73 people Fourth Place: Rachel has referred 71 people Fifth Place: Robin has referred 69 people etc In the example above, all of the referrers also have their email address stored in the same line as their name. I need for their names to be clickable so that I can send each of them an individual email.
Project ID: 3800717

About the project

29 proposals
Remote project
Active 16 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$29.75 USD in 14 days
4.9 (175 reviews)
6.2
6.2
29 freelancers are bidding on average $35 USD for this job
User Avatar
See private message.
$68.85 USD in 14 days
5.0 (253 reviews)
8.0
8.0
User Avatar
See private message.
$29.75 USD in 14 days
4.8 (766 reviews)
7.3
7.3
User Avatar
See private message.
$17 USD in 14 days
4.9 (137 reviews)
6.4
6.4
User Avatar
See private message.
$33.15 USD in 14 days
4.9 (236 reviews)
6.2
6.2
User Avatar
See private message.
$34 USD in 14 days
4.9 (159 reviews)
5.8
5.8
User Avatar
See private message.
$17 USD in 14 days
5.0 (98 reviews)
5.5
5.5
User Avatar
See private message.
$12.75 USD in 14 days
5.0 (73 reviews)
5.7
5.7
User Avatar
See private message.
$12.75 USD in 14 days
5.0 (124 reviews)
5.5
5.5
User Avatar
See private message.
$20.40 USD in 14 days
4.9 (43 reviews)
5.1
5.1
User Avatar
See private message.
$17 USD in 14 days
5.0 (30 reviews)
4.5
4.5
User Avatar
See private message.
$17 USD in 14 days
4.7 (65 reviews)
4.7
4.7
User Avatar
See private message.
$21.25 USD in 14 days
4.9 (36 reviews)
4.0
4.0
User Avatar
See private message.
$51 USD in 14 days
5.0 (13 reviews)
3.8
3.8
User Avatar
See private message.
$21.25 USD in 14 days
5.0 (23 reviews)
3.4
3.4
User Avatar
See private message.
$59.50 USD in 14 days
4.2 (3 reviews)
3.9
3.9
User Avatar
See private message.
$68 USD in 14 days
4.9 (17 reviews)
3.2
3.2
User Avatar
See private message.
$25.50 USD in 14 days
5.0 (13 reviews)
2.9
2.9
User Avatar
See private message.
$10.20 USD in 14 days
5.0 (9 reviews)
3.1
3.1
User Avatar
See private message.
$34 USD in 14 days
5.0 (9 reviews)
2.9
2.9
User Avatar
See private message.
$42.50 USD in 14 days
5.0 (6 reviews)
2.7
2.7

About the client

Flag of UNITED STATES
Houston, United States
5.0
24
Member since Mar 17, 2002

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.