Skip to content

Instantly share code, notes, and snippets.

@mark-cooper
Last active December 17, 2015 19:19
Show Gist options
  • Save mark-cooper/5659473 to your computer and use it in GitHub Desktop.
Save mark-cooper/5659473 to your computer and use it in GitHub Desktop.
Evergreen: quick dupe isbn lookup
-- SHOW EVERGREEN DATABASE IDS
-- WHERE 020 'a' value appears more than once
select distinct value as isbn, record
from metabib.real_full_rec
where value in
(
-- get duplicate isbns
select value as isbn
from metabib.real_full_rec
where tag = '020' and subfield = 'a'
group by isbn
having count(id) > 1
)
order by isbn, record;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment