You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT bre.id, ac.circ_lib, COUNT(acn.id) AS count FROM biblio.record_entry AS bre INNER JOIN asset.call_number AS acn ON bre.id = acn.record INNER JOIN asset.copy AS acp ON acn.id = acp.call_number INNER JOIN action.circulation AS ac ON acp.id = ac.target_copy INNER JOIN metabib.record_attr AS mra ON bre.id = mra.id WHERE ac.circ_lib IN (1301) AND (xact_finish IS NULL OR xact_finish > NOW() - interval '1 year') AND bre.deleted = false AND mra.attrs @> '"search_format"=>"physicalbooks"' GROUP BY ac.circ_lib, acn.id, bre.id ORDER BY ac.circ_lib, count DESC LIMIT 100;