Determine the time difference from records in a select

From: "Creager, Robert S" <CreagRS(at)LOUISVILLE(dot)STORTEK(dot)COM>
To: "'SQL - PGSQL'" <pgsql-sql(at)postgresql(dot)org>
Subject: Determine the time difference from records in a select
Date: 2001-06-13 18:32:19
Message-ID: 10FE17AD5F7ED31188CE002048406DE8514DE0@lsv-msg06.stortek.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


I apologize in advance, 'cause I think this was addressed a couple of months
ago, but I cannot find it in the archives.

I have a firewall hit database which keeps the date of the hit and the
offenders IP (among other items). I would like to be able to execute a
select which would show each unique IP and the time difference from the
latest hit to the first hit. I can do this in scripts, but was wondering if
there is a pure SQL query/queries way to accomplish this.

Help?
Rob

Robert Creager
Senior Software Engineer
Client Server Library
303.673.2365 V
303.661.5379 F
888.912.4458 P
StorageTek
INFORMATION made POWERFUL

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message jeff 2001-06-13 20:38:12 large going giving errors.
Previous Message Josh Berkus 2001-06-13 16:56:33 Re: Inheritance - Multiple membership