15.10 - EventCount - Teradata Database

Teradata Database SystemFE Macros

prodname
Teradata Database
vrm_release
15.00
15.10
category
Administration
featnum
B035-1103-015K

EventCount

REPLACE MACRO SystemFE.EventCount
 (Fromdate (date,               FORMAT 'YYYY-MM-DD'),
  Todate   (date, DEFAULT DATE, FORMAT 'YYYY-MM-DD')) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 80;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set omit on 1,2;';
echo 'set pagelength 60;';
echo 'set heading "&DATE||Total Of Each Event||&TIME//Between &1 and  &2";
';
Select    :Fromdate      (Format 'YYYY-MM-DD')
        , :Todate        (Format 'YYYY-MM-DD')
        , Event_Tag
        , Count(*)       (Title '   Total   //Occurrences')
From      DBC.Software_Event_Log
Where     TheDate between :fromdate and :todate
And       Line=1
And       ( Severity > 20
 Or  Event_Tag = '033-13855-00'
 Or  Event_Tag = '033-13892-00' )
Group By  Event_Tag
Order By  4 Desc;
 
echo 'set defaults;';
);