I am trying to run a query that will search the bibliographic record database and output all of the records that have more than one 020 tag according to some set parameters.
Note: the parameters are flexible. The important part is to find the records with two or more 020 tags.
Here is what I have:
select b.bib#, b.text, t.processed, i.call, i.collection, i.creation_date
from bib b, title t, item i
where b.bib# = t.bib# and t.bib# = i.bib#
and b.tag = '020'
and i.collection in ('PIC', 'E')
order by i.creation_date DESC, i.collection
This will display each 020 and the accompanying text, but I want it to only display records with two or more 020s. Group by bib# maybe?