I have a table author_data:
 author_id | author_name
 ----------+----------------
 9         | ernest jordan
 14        | k moribe
 15        | ernest jordan
 25        | william h nailon 
 79        | howard jason
 36        | k moribe
Now I need the result as:
 author_id | author_name                                                  
 ----------+----------------
 9         | ernest jordan
 15        | ernest jordan     
 14        | k moribe 
 36        | k moribe
That is, I need the author_id for the names having duplicate appearances. I have tried this statement:
select author_id,count(author_name)
from author_data
group by author_name
having count(author_name)>1
But it's not working. How can I get this?
 
     
     
     
     
    