开发者

Count total number of callers?

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开发者_JS百科 but I didn't get anywhere.


SELECT COUNT(DISTINCT 'commenter_name') FROM 'comment';


SELECT DISTINCT `commenter_name` FROM `comments`


Select Count(*) From (Select DISTINCT commenter_name from comment) as CmtCnt;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜