Ready to use Handy Library Manager SQL queries: How many books were loaned out by format?
I am using this SQL query to determine how many books were loaned out by format. However, I need help calculating the sum of the Item_Count column. I have seen many examples using the SUM function, but none include pulling in additional data. Can you please assist me?
SELECT A.Category, COUNT(*) AS ITEM_COUNT FROM LOAN B JOIN LIBRARY A ON B.ITEM_IDNO = A.IDNO WHERE B.LOANDATE < CURRENT_DATE AND B.LOANDATE >= CURRENT_DATE-30 GROUP BY Category;
SELECT A.CATEGORY, COUNT(*) AS ITEM_COUNT FROM LOAN B JOIN LIBRARY A ON B.ITEM_IDNO=A.IDNO WHERE B.LOANDATE < CURRENT_DATE AND B.LOANDATE>=CURRENT_DATE-30 GROUP BY CATEGORY UNION ALL SELECT 'SUM' ITEM_IDNO, COUNT(*) FROM LOAN WHERE LOANDATE < CURRENT_DATE AND LOANDATE>=CURRENT_DATE-30;
Tables and fields used in the query:
A - Libary Items table (LIBRARY)
B - Loans table (LOAN)
Questions:
Handy Library Manager 4.4, review new features
Inquiries from Librarians and Libraries
Library Web Search, review new web search
Library Search 4.0, review new desktop search
Getting started library video lessons
How to include library name on labels
Library, Data Entry Form Designer
Edit item or borrower data in the check-in/check-out window?
Link item lost fine with the PRICE data field?
Handy v3.2 supports letter tabs?
How to predefine library email messages?
How to update library data from the web with ISBN?
How to predefine library email messages?
Compilation of questions and answers from library requests will help you to make purchase decision.
How to verify if the item is checked out in the library main catalog window?
How to create a new record using Copy Selected Item?
Special Library, how to manage digital and paper document library?
What is the maximum number of library items?
Library Software for Small Libraries, Windows application
Handy Library Manager
small library software
library tour
library features
try now, download
cloud
library software reviews
Copyright © 2025 · All Rights Reserved · PrimaSoft PC