Skip to main content
ExLibris

Knowledge Assistant

BETA
  • Subscribe by RSS
  • Back
    Aleph

     

    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Aleph
    3. Knowledge Articles
    4. SQL for OPAC statistics (using z69 OPAC-event table)

    SQL for OPAC statistics (using z69 OPAC-event table)

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    1. Description
    2. Resolution

     

    • Product: Aleph
    • Product Version: 20, 21, 22, 23
    • Relevant for Installation Type: Dedicated-Direct, Direct, Local

     

    Description

    How can we get a report of the number of Aleph OPAC searches and search types per college for the fiscal year? (We're a consortium.)  The " Canned Aleph OPAC statistics reports " article has some interesting suggestions, but we just need something basic.

    Resolution

    Note:  If you have the ARC (Aleph Reporting Center) product, then it has canned reports similar to the below.  You should check those first.

     

    > s+ xxx01  <to connect to bib library>

     

    To get the total number of searches of all kinds (between July 1, 2015, and June 30, 2016):

    SQL> select count(*) from z69 where substr (z69_time_stamp,1,8) >= '20150701' and substr (z69_time_stamp,1,8) <= '20160630';


    To group results by base/location:

    SQL> select Z69_SEARCH_BASE, count(*) from z69 where substr (z69_time_stamp,1,8) >= '20150701' and substr (z69_time_stamp,1,8) <= '20160630' group by Z69_SEARCH_BASE;


    To get counts of keyword searches by search types:

    SQL> select count(*) from z69 where z69_search_query like 'Words=%' and substr (z69_time_stamp,1,8) >= '20150701' and substr (z69_time_stamp,1,8) <= '20160630'; 
     <the above is for the WRD / W-001 All fields index>

    Then do these for Words-in-Titles and Words-in-Authors, and Words-in-Subjects:

    SQL> select count(*) from z69 where z69_search_query like '%Titles=%' and substr (z69_time_stamp,1,8) >= '20150701' and substr (z69_time_stamp,1,8) <= '20160630';

    SQL> select count(*) from z69 where z69_search_query like '%Authors=%' and substr (z69_time_stamp,1,8) >= '20150701' and substr (z69_time_stamp,1,8) <= '20160630';

    SQL> select count(*) from z69 where z69_search_query like '%Subjects=%' and substr (z69_time_stamp,1,8) >= '20150701' and substr (z69_time_stamp,1,8) <= '20160630';

    Then, using the tab00.eng column 11 values, do the same for whatever other W-nnn entries you want to report on.
     {The problem with having a single search giving counts for all Word searches is that the Word search type text (the part before the equal sign) is of varying length.}

     

    To group browses by browse types:
    SQL> select z69_scan_code, count(*) from z69 where z69_scan_code is not null and substr (z69_time_stamp,1,8) >= '20150701' and substr (z69_time_stamp,1,8) <= '20160630' group by z69_scan_code;

     


     


    • Article last edited: 5-May-2017
    View article in the Exlibris Knowledge Center
    1. Back to top
      • SQL for locating patrons with specific ID-type and loans in specific time period
      • SQL for updating one type of record with fields from another type.
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Language
      English
      Product
      Aleph
    2. Tags
      1. contype:kba
      2. OPAC
      3. Prod:Aleph
      4. SQL
      5. Statistics
      6. z69
    1. © Copyright 2025 Ex Libris Knowledge Center
    2. Powered by CXone Expert ®
    • Term of Use
    • Privacy Policy
    • Contact Us
    2025 Ex Libris. All rights reserved