Table Time: Issues, old_issues and statistics

Table Time: Issues, old_issues and statistics


When creating reports for circulation information, it is important to identify the correct table from the database schema to pull the information from. There are three tables that can be used to report on check outs, but they contain different information. It is important to have a clear  understanding of the information that is needed for the report.
Notes
For more details on how to view the database schema, please submit a ticket or check our Help Centre.

The three tables for check out reports

There are three tables that contain checkout information:

issues - what is happening now

This table contains information about items that are currently checked out on a patron account. It will not contain any information about items that were checked out and have been checked back in.

old_issues - what has happened in the past

This table contains information about items that have already been checked out and checked back in. It will not contain any information about items that are currently checked out on a patron account.

statistics - the overview of the past and the future

The statistics table contains information about almost all actions taken on the system. To use this table, the specifically for checkouts or checkins, the type of transaction must be defined. There is a list of the type of transactions the table contains in the database schema. 

To find details of checkouts, use the issue type.
To find details of checkins, use the return type.

Questions to help you identify which table to use

Are you looking for information for checkouts that are currently on the patron account?
Are you looking for information on items that have been checked out and checked back in?
Do you want information on both checkouts that are still on patron accounts and items that have been checked out and checked back in?


VersionDateDetailAuthor
1.008/06/26Document createdHolly Cooper


    • Related Articles

    • How to Find and Run a SQL Report

      What are reports for? Reports are used to find and present data about the information on the system in a structured manner. Reports use SQL to ask questions of the Koha database. How to find reports on your system Go to the Reports module on the Koha ...
    • Overview of some SQL Report Functions

      Overview of SQL Report Functions This FAQ is an example of a simple report describing the “anatomy” of the SQL code used.  Details about the different functions are outlined in the table below the report.  Some functions are mandatory to use in order ...
    • How to view the content of an SQL report

      This document will outline how to view the content of an SQL report on the Koha system. This may be a precursor to editing the report or just a way to start studying the format of reports How to find reports on your system Go to the Reports module on ...
    • The two most common SQL statements within Koha application reports

      This document will outline the two most common statements which appear in SQL reports run in the Koha application. SQL reports within the Koha application can only be run the return information that exists in the database, however, other SQL tools ...
    • Question of the Week - Using the CASE statement and formatting information to be included in a SQL report

      This document will outline how a list of information can be formatted so it can be easily added to a SQL statement as well as a creative way we used the CASE statement to categorise the different system preferences being shown in an SQL report. The ...