Hi
I was wondering if its possible to add up colums which have numbers in during a query to give the top 10 people who have earned the most, which also shows the total earned.
I have a query that gets the top 10 people with feedback like this...
SELECT drivernumber, count(*) as posts from feedback where `drivernumber` GROUP BY `drivernumber` ORDER BY `posts` DESC LIMIT 10
Which works very well, it returns the top 10 people who have been left feedback and how many [posts]
The table also has a 'price' colum where the customer enters what they paid for the job.
So, using just a query, is it possible to add up all the numbers in the price colum and return the total, then display it as the top 10 people who have earned the most?
Or do I need to pull everything down in to an array and work it out?
Many thanks if you can help
😃