How many items checked out last month?

  • Ray Johnson

    Ray Johnson - 2009-06-21

    Is there a way to see how many items were checked out in a given time period?

    I can see how many are CURRENTLY checked out, but I don't know if there's a historical record in the MySQL database and I'm kind of lost.

    Assume I have three books:  Book One, Book Two and Book Three

    Book One is checked out three times in June, each for one week, by three different users.
    Book Two is checked out once in June and renewed by the same user.
    Book Three is checked out twice by the same user (separated by a week on the shelf).

    I'd like a report that would let me select June 2009 and give me

    Book One - 3
    Book Two - 1 (or 2, I'm not really fussy of checkout vs. renewals, but 1 would be more accurate)
    Book Three - 2 (even though it was the same user).

    Can anyone point me in the right direction?

    • psuarz

      psuarz - 2009-06-26

      There is a history of all items that were checked out in biblio_hist_dm. You can make other report file in /reports/defs (.rpt extension) with your criteria using sql.
      I made something like that for me time ago. Perhaps it can help you .

      .title checkouthistory
      .category Circulation
      .column bibid hidden
      .column status_begin_dt hidden
      .column barcode_nmbr sort=barcode_nmbr
      .column title sort=title func=biblio_link
      .column author sort=author
      .column checkoutCount sort=checkoutCount
      .    date date_begin title="From (mm/dd/yy)"
      .   date date_end title="To (mm/dd/yy)"
      .   string barcode title="Report by copy"
      .    order_by
      .        item barcode_nmbr
      .        item title
      .        item author
      .        item checkoutCount type=numeric
      .    end order_by
      .end parameters
          select b.bibid, c.barcode_nmbr, b.title,,
                 h.status_begin_dt ,
                 count(h.status_begin_dt) checkoutCount
          from biblio_status_hist h, biblio_copy c, biblio b
          where   h.bibid = c.bibid
              and h.copyid = c.copyid
              and h.bibid = b.bibid
              and h.status_cd = 'out'

      .    if_set date_begin
              and h.status_begin_dt >= %date_begin%
      .    end if_set
      .    if_set date_end
              and h.status_begin_dt <= %date_end%
      .    end if_set

            group by b.title,
      .    if_set barcode
      .    end if_set
      .    order_by_expr
      .end sql

      • Ray Johnson

        Ray Johnson - 2009-06-26

        That is very helpful.  Thanks!!



Cancel  Add attachments