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.
我有一个表,其中有一列包含学生姓名:一个学生姓名可以输入多次。因此,如果我们想知道哪些学生在桌子上以及出现了多少次......我们如何计算呢?
我正在使用 DB2。
select name, count(*) from your_table group by name;
或者
select name, count(*) from your_table where name = 'xxx' group by name;
SELECT name, count(*) FROM your_table GROUP BY name