SQL to identify bibs with no 520 but matching other bibs with 245ab

Hello,

I have used Create Lists to identify bibs with a specific cat date and no 520, and then imported the titles back into Sierra to find other bibs with the same 245ab.

This takes so many steps! I wonder if anyone has a SQL query for the following:

  1. Search for a set of bib records by a specific cat date range that do not have a 520|a
  2. Query those bibs against all bib records to find all those with a matching 245|a and 245|b
  3. Sort by 245|a, 245|b, and then cat date.

Fields in result: Bib, cat date, format, bib created date, and 245a and 245b.

The result should list the bibs with and without a 520.

Thank you for any assistance!

Elizabeth