Community Contributions > SQL Workbench

Missing awards query

(1/1)

Donzo:
I'm looking for a query to identify awards that were not generated.

-Don

Rick Leffler:
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')

Navigation

[0] Message Index

Go to full version