Reputation: 6035
I'm currently doing this query to find the guy who makes the most calls:
SELECT
`commenter_name`,
COUNT(*) AS `calls`
FROM `comments`
GROUP BY `commenter_name`
ORDER BY `calls` LIMIT 1
What I want now is to be able to find out how many total unique callers. I tried using DISTINCT
but I didn't get anywhere.
Upvotes: 0
Views: 155
Reputation:
Select Count(*) From (Select DISTINCT commenter_name from comment) as CmtCnt;
Upvotes: 0