「PostgreSQL入門」重複データと重複件数を取得する方法

1.列column_testが重複データ
SELECT
column_test
FROM
table_AA
GROUP BY
column_test
HAVING
COUNT(column_test) > 1

2.列column_testが重複データと重複件数
SELECT
COUNT(column_test) recordCnt
, column_test
FROM
table_AA
GROUP BY
column_test
HAVING
COUNT(column_test) > 1

PostgreSQL

Posted by arkgame