Created
September 23, 2016 15:59
-
-
Save rayvoelker/dffb4bc55a20283217288f920edfae60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
e.index_entry as barcode, | |
'i' || i.record_num || 'a' AS item_record_num, | |
i.record_num as item_num, | |
'b' || b.record_num || 'a' as bib_record_num, | |
b.record_num as bib_num, | |
i.creation_date_gmt as item_creation_date, | |
i.deletion_date_gmt as item_deletion_date, | |
b.creation_date_gmt as bib_creation_date, | |
b.deletion_date_gmt as bib_deletion_date | |
FROM | |
sierra_view.phrase_entry AS e | |
LEFT OUTER JOIN sierra_view.record_metadata AS i | |
ON | |
e.record_id = i.id | |
LEFT OUTER JOIN sierra_view.bib_record_item_record_link AS l | |
ON | |
i.id = l.item_record_id | |
-- now get the bib record num | |
LEFT OUTER JOIN sierra_view.record_metadata as b | |
ON | |
l.bib_record_id = b.id | |
WHERE | |
(e.index_tag || e.index_entry) in | |
( | |
'br000000547', | |
'br002008381', | |
'br002935831', | |
'br009241290', | |
'br009241308', | |
'br009241316', | |
'br009241324', | |
'br009241332', | |
'br702233503'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment