计数的值多少次出现(Counting how many times a value appeared

2019-09-28 16:49发布

我使用SELECT DISTINCT name FROM table以获取与出现在列不同的名称表。 我怎样才能得到一个额外的列返回此特定的名字已经出现在列的次数?

Answer 1:

select name, count(1) from table
group by name;


文章来源: Counting how many times a value appeared
标签: sql counting