List:General Discussion« Previous MessageNext Message »
From:A. Clausen Date:June 16 2004 8:51pm
Subject:Re: Tough Query Problem
View as plain text  
----- Original Message ----- 
From: "Dan Nelson" <dnelson@stripped>
To: "Aaron Clausen" <techlists@stripped>
Cc: "MySQL Mailing List" <mysql@stripped>
Sent: Wednesday, June 16, 2004 10:20
Subject: Re: Tough Query Problem


> In the last episode (Jun 16), Aaron Clausen said:
> > I am trying to write a script that can take logs from our mail
> > server, boil down the rejections to determine the sources of
> > distributed SMTP dictionary attacks against our mail server.
> > 
> > Basically I have a table "send_failures like this that gets fed with
> > the raw data from the logs:
> > 
> > host_ip date
> > -------------------------------------------
> > 111.111.111.110 2004-06-03 13:42:22
> > 
> > And so on and so forth.
> > 
> > Now it's trivial to write a query to find the pure counting of the
> > attacks: However, I also want to have latest date of the attack
> > included as well, so that the above exampe would boil down to a query
> > with results like this (I'm running MySQL 3.23.58):
> 
> Add "MAX(date) as last_attempt_date" to your select field list.

That did the job!  Thanks.

-- 
A. Clausen
techlists@stripped
Thread
Tough Query ProblemAaron Clausen16 Jun
  • Re: Tough Query ProblemDan Nelson16 Jun
  • Re: Tough Query ProblemA. Clausen16 Jun