beautypg.com

Sample query result, Summary of all events – HP Neoview Release 2.5 Software User Manual

Page 72

background image

Example A-9 Summary of all Events

This report summarizes all events for a given time period and returns results grouped by SSID
and event number.

SELECT
COUNT(*) AS CNT,
EVENT_NUMBER AS EVENT_NUMBER,
CASE
WHEN LEFT(SSID,6) = 'TANDEM'
THEN SUBSTRING(SUBSTRING(SSID
FROM
CHAR_LENGTH('TANDEM. '))FOR LOCATE('.' ,SUBSTRING(SSID
FROM
CHAR_LENGTH('TANDEM. ')) )-1)
ELSE SSID
END AS SUB_SYS,
MIN(GENERATED_TIMESTAMP_LCT) AS FIRST_TIME,
MAX(GENERATED_TIMESTAMP_LCT) AS LAST_TIME,
TRIM(SUBSTRING(MAX(TEXT)
FROM
CHAR_LENGTH('00:00 01FEB09 001.01.1000 ')) ) AS EXAMPLE_EVENT_TEXT,
SSID AS SSID
FROM
NEO.HP_METRICS.EVENTS_VW1
WHERE
GENERATED_TIMESTAMP_LCT >= TIMESTAMP '$$__FROM_TIME$$' and
GENERATED_TIMESTAMP_LCT <= TIMESTAMP '$$__TO_TIME$$'
GROUP BY
SSID,
EVENT_NUMBER
ORDER BY
CNT DESC FOR READ UNCOMMITTED ACCESS IN SHARE MODE

;

Sample Query Result

This example shows a report summarizing all events for a given time period and returns results
grouped by SSID and event number.

72

Sample Queries for Event Information