I have a table with Client IDs and amount spent. I can get a unique count of the clients and I can get a total spent. How do I get the average spent over all?
So I need to do my Total divided by Clients to get the average but not sure how to do that in MySQL. Been trying everything.
SELECT
COUNT(DISTINCT cost_clientid) AS Clients,
SUM(cost_amount) AS Total
FROM
p_skillshighway_costs
Community Page
Last updated:
Last updated: