Custom Reports: Query by Count of Circ Transaction IDs
[This article was copied from the Voyager Wiki.]
This query finds the 30 items circulated in a given time period by a Count of Circ_Transaction_IDs. I saved it from VOY-L and loved it so much I wanted to share!
SELECT TOP 30 BIB_TEXT.TITLE, Count(CIRC_TRANS_ARCHIVE.CIRC_TRANSACTION_ID) AS CountOfCIRC_TRANSACTION_ID
FROM ITEM_TYPE INNER JOIN ((((CIRC_TRANS_ARCHIVE INNER JOIN ITEM ON CIRC_TRANS_ARCHIVE.ITEM_ID = ITEM.ITEM_ID) INNER JOIN BIB_ITEM ON ITEM.ITEM_ID = BIB_ITEM.ITEM_ID) INNER JOIN BIB_TEXT ON BIB_ITEM.BIB_ID = BIB_TEXT.BIB_ID) INNER JOIN CIRC_POLICY_MATRIX ON CIRC_TRANS_ARCHIVE.CIRC_POLICY_MATRIX_ID = CIRC_POLICY_MATRIX.CIRC_POLICY_MATRIX_ID) ON ITEM_TYPE.ITEM_TYPE_ID = CIRC_POLICY_MATRIX.ITEM_TYPE_ID
WHERE (((CIRC_TRANS_ARCHIVE.CHARGE_DATE) Between [start] And DateAdd("d",1,[end])) AND ((ITEM.PERM_LOCATION)="1") AND ((ITEM_TYPE.ITEM_TYPE_NAME) Not Like "*" & "Reserve" & "*"))
GROUP BY BIB_TEXT.TITLE
ORDER BY Count(CIRC_TRANS_ARCHIVE.CIRC_TRANSACTION_ID) DESC;