Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我SELECT DISTINCT name FROM table用来获取列中出现的具有不同名称的表。我怎样才能得到一个额外的列来返回这个特定名称出现在列上的次数?
SELECT DISTINCT name FROM table
select name, count(1) from table group by name;