Determine the time difference from records in a select - Mailing list pgsql-sql

From Creager, Robert S
Subject Determine the time difference from records in a select
Date
Msg-id 10FE17AD5F7ED31188CE002048406DE8514DE0@lsv-msg06.stortek.com
Whole thread Raw
Responses Re: Determine the time difference from records in a select
Re: Determine the time difference from records in a select
List 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




pgsql-sql by date:

Previous
From: "David M. Richter"
Date:
Subject: IRIX AND POSTGRES 7.1.2
Next
From:
Date:
Subject: large going giving errors.