folio-org / folio-analytics

Community query repository for FOLIO analytics based on Metadb/LDP
Apache License 2.0
15 stars 30 forks source link

Fix Metadb derived table loans_renewal_dates #854

Open VandanaShah-Cornell opened 1 month ago

VandanaShah-Cornell commented 1 month ago

-- Corrections: -- 1. changed source table to "folio_circulation.audit_loan" -- 2. linked to "folio_circulation.loan" table to get actual loan status -- 3. truncated the seconds from the renewal date to eliminate false renewal counts -- 4. added the item hrid -- 5. renamed "renewal_count" to "folio_renewal_count" (can be used to sum renewals over a date range) -- 6. eliminated the "loan_renewal_count" field, since that is a very misleading figure and must not be used to sum renewals over a date range