Determine the time difference from records in a select

Поиск
Список
Период
Сортировка
От Creager, Robert S
Тема Determine the time difference from records in a select
Дата
Msg-id 10FE17AD5F7ED31188CE002048406DE8514DE0@lsv-msg06.stortek.com
обсуждение исходный текст
Ответы Re: Determine the time difference from records in a select  ("Josh Berkus" <josh@agliodbs.com>)
Re: Determine the time difference from records in a select  ("Josh Berkus" <josh@agliodbs.com>)
Список 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 по дате отправления:

Предыдущее
От: "David M. Richter"
Дата:
Сообщение: IRIX AND POSTGRES 7.1.2
Следующее
От:
Дата:
Сообщение: large going giving errors.