Reports (Ad-hoc SQL Queries)
Report Title | Last Updated | |
---|---|---|
Total Scan Ingestion Time | 11/8/2020 | |
Description | Notes: | |
Total start to finish time for all Completed and Active Pending Scans | ||
Parameters | Detail | Default |
Active filter | This column currently remains | |
Number of scans included | The number after the TOP keyword can be adjusted or removed all together; this restricts the number of PendingScans included in this report. Ordering parameters also apply. |
|
Order | ASC: earliest scans DESC: latest scans |
|
SQL Query (MS SQL Server) | ||
/* * Total start to finish time for all 'Completed' and 'active' Pending Scans * Result time unit: minutes */ SELECT (DATEDIFF(millisecond, CONVERT(DATETIME2, oldestCreatedDate, 103), CONVERT(DATETIME2, latestEndDate, 103))/1000 / 60) AS totalTime FROM (SELECT MIN(createdDate) AS oldestCreatedDate, MAX(modifiedDate) AS latestEndDate FROM (SELECT TOP 1000 * FROM NewPendingScan WHERE active = 1 AND pendingScanStatus = 'COMPLETED' ORDER BY createdDate DESC) ps ) t ; |