culibraries / library-reporting

Anything to do with library reporting, mostly but not limited to FOLIO.
0 stars 0 forks source link

Business Claims Report Report #119

Closed arthur-aguilera closed 1 year ago

arthur-aguilera commented 1 year ago

Update: missing derived tables in production. Effective location names have to be fixed.

AmeliaDS commented 1 year ago

--Returns a list of all items marked 'Claimed returned' across selected Business Library locations. SELECT DISTINCT lt.item_status AS status, lt.claimed_returned_date AS claim_date, it.barcode AS barcode, lt2.name AS location, hrt.call_number AS call_number, it.copy_number AS copy_number, it.volume AS volume, it2.title AS title, lt.action_comment AS note, lt.user_id AS patron_uuid FROM folio_circulation.loant lt LEFT JOIN folio_inventory.itemt it ON it.id = lt.item_id LEFT JOIN folio_inventory.locationt lt2 ON lt2.id = lt.item_effective_location_id_at_check_out LEFT JOIN folio_inventory.holdings_recordt hrt ON hrt.id = it.holdings_record_id LEFT JOIN folio_inventory.instancet it2 ON it2.id = hrt.instance_id WHERE lt.item_status = 'Claimed returned' AND lt2.code IN ('BUS','BUSRES','BUSPOP','BUSNB','BUSOV','BUSRES','BUSSER','BUSST') AND call_number IS NOT NULL ORDER BY claim_date ;

/Results & Questions: -No results (9/15/23) /