pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Creager, Robert S <CreagRS@LOUISVILLE.STORTEK.COM>
To: 'SQL - PGSQL' <pgsql-sql@postgresql.org>
Subject: Determine the time difference from records in a select
Date: Wed, 13 Jun 2001 12:32:19 -0600
Message-ID: <10FE17AD5F7ED31188CE002048406DE8514DE0@lsv-msg06.stortek.com> (raw)


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





view thread (3+ messages)  latest in thread

Message-ID: <10FE17AD5F7ED31188CE002048406DE8514DE0@lsv-msg06.stortek.com>
Permalink:  ../10FE17AD5F7ED31188CE002048406DE8514DE0@lsv-msg06.stortek.com/
Also on:    postgresql.org/message-id/10FE17AD5F7ED31188CE002048406DE8514DE0@lsv-msg06.stortek.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: CreagRS@LOUISVILLE.STORTEK.COM
  Subject: Re: Determine the time difference from records in a select
  In-Reply-To: <10FE17AD5F7ED31188CE002048406DE8514DE0@lsv-msg06.stortek.com>
  References: <10FE17AD5F7ED31188CE002048406DE8514DE0@lsv-msg06.stortek.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox