I'm trying to optimize my queries a bit but can't quite get it right.
I'm looking to get some statistics from a table
I have a query for the top contributors
SELECT `name`, `amount` FROM `customers` ORDER by `amount` DESC LIMIT 10
but I also want to get the SUM and AVG of amount in all records, not just the top 10. I'm not sure how to do this without having a new query for each.