I suggest a window function in a subquery:
SELECT author_id, author_name
FROM (
SELECT author_id, author_name
, count(*) OVER (PARTITION BY author_name) AS ct
FROM author_data
) sub
WHERE ct > 1;
You will learn the basic aggregate function count(). It can be turned into a window function by adding a sentence OVER- just like any other aggregated function.
, . .
(v.8.3 ) - - :
SELECT author_id, author_name
FROM author_data a
WHERE EXISTS (
SELECT 1
FROM author_data a2
WHERE a2.author_name = a.author_name
AND a2.author_id <> a.author_id
);
, author_name.