How can a make a report or query from duplicate entries in table

Hi, I’m working on a lameness and medication record for sheep using libreoffice base.

I’d like to be able to create a query that only shows records for an animal that has had its tag number entered in to the database multiple times. I’m not that sure how to go about it however. Any help would be most appreciated.

Regards

Gareth

To find tags wich has a doubles use query like this

SELECT <tag> FROM <table_of_sheep> GROUP BY <tag> HAVING (  COUNT( <tag> ) > 1  )

To show all records with such tags use

SELECT * FROM <table_of_sheep> 
   WHERE <tag> IN ( SELECT <tag> FROM <table_of_sheep> 
                                GROUP BY <tag> 
                                HAVING (  COUNT( <tag> ) > 1  )) 
 ORDER BY <tag> ASC