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.
学生名を含む列を持つテーブルがあります。1 つの学生名を複数回入力できます。では、テーブルにどの生徒が何人いるかを調べたい場合は、どうすればそれを数えることができるでしょうか?
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