Skip to main content
Kofax

SQL Query for total pages scanned during time period

8321

QAID # 8321 Published

Question / Problem:

I want to have an overview of the current amount of pages scanned. What is the relevant SQL query?

Answer / Solution:

Below is an example of a query to execute to gather the total amount of pages scanned during the month of April, 2017:

SELECT
SiteName, StationID, SUM(PagesScanned) AS PagesScanned,
YEAR(SessionEndDateTime) AS ScanYear,
MONTH(SessionEndDateTime) AS ScanMonth,
DAY(SessionEndDateTime) AS ScanDay
FROM
viewStatsSession
WHERE
SessionEndDateTime >= {ts '2017-04-01 00:00:00'}
AND SessionEndDateTime <= {ts '2017-04-30 23:59:00'}
AND Deleted = 0
GROUP BY
YEAR(SessionEndDateTime), MONTH(SessionEndDateTime), DAY(SessionEndDateTime),
SiteName, StationID
HAVING
SUM(PagesScanned) <> 0
ORDER BY
YEAR(SessionEndDateTime), MONTH(SessionEndDateTime),
SiteName, DAY(SessionEndDateTime), StationID

Applies to:

Product Version
CAPTURE 10.0
  10.1
  10.2
  11.0
  • Was this article helpful?