Approved Workman Database
Community Contributions => SQL Workbench => Topic started by: Donzo on April 28, 2022, 11:57:10 AM
-
I'm looking for a query to identify awards that were not generated.
-Don
-
The following query will list any persons with a completed book for which there is no corresponding book-level award. Note: This applies ONLY to the LEGACY desktop version (not the cloud version). Depending on when you run this, you may need to adjust the dates of course.
select p.filing_name, b.book_name, b.completed_date
from person p, book b
where p.person_id = b.person_id
and b.completed = 'Yes' and completed_date > '2021-8-1'
and book_id not in (select book_id from award where award_source = 'Book' and date_earned > '2021-8-1')