count(*)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • D

    #1

    count(*)

    select count(*) from syslog.SystemEv ents where message like
    '%postfix/smtp[%' and (message like '%@carcass.us>% ' or message like
    '%@deadghost.co m>%' or message like '%@phatho.com>% ');

    Above query returns error. Have no idea how to count something like this and
    the manual is not helping. I'm thinking select it into a temp table and then
    count? I have had no luck with temp tables either. They just don't seem to
    work for me. Anyone got a simple solution?


  • D

    #2
    Re: count(*)

    I figured it out:

    select count(distinct id) from syslog.SystemEv ents where message like
    '%postfix/smtp[%' and (message like '%@carcass.us>% ' or message like
    '%@deadghost.co m>%' or message like '%@phatho.com>% ');


    Comment

    Working...