Deprecated: Array and string offset access syntax with curly braces is deprecated in /homepages/12/d802028692/htdocs/forum/Sources/Subs.php on line 3863
Missing awards query

Author Topic: Missing awards query  (Read 430 times)

Donzo

  • Newbie
  • *
  • Posts: 1
Missing awards query
« on: April 28, 2022, 11:57:10 AM »
I'm looking for a query to identify awards that were not generated.

-Don

Rick Leffler

  • Administrator
  • Sr. Member
  • *****
  • Posts: 263
    • Approved Workman
Re: Missing awards query
« Reply #1 on: April 29, 2022, 09:26:05 AM »
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')
Rick at Leffler Systems
Murfreesboro, Tennessee