Path: text.usenetserver.com!out03a.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!postnews.google.com!f40g2000pri.googlegroups.com!not-for-mail
From: jeremy <jeremy0505@gmail.com>
Newsgroups: comp.databases.oracle.server
Subject: Looking for "gaps" (from a time perspective) in data
Date: Fri, 10 Oct 2008 02:53:14 -0700 (PDT)
Organization: http://groups.google.com
Lines: 27
Message-ID: <b029e883-bbc1-4d74-9986-ed632b75210d@f40g2000pri.googlegroups.com>
NNTP-Posting-Host: 193.164.109.10
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1223632394 17100 127.0.0.1 (10 Oct 2008 09:53:14 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 10 Oct 2008 09:53:14 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: f40g2000pri.googlegroups.com; posting-host=193.164.109.10; 
 posting-account=h5IA6woAAABcHbb4vAIZFk2TfZkZ_eqe
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) 
 Gecko/2008092417 Firefox/3.0.3,gzip(gfe),gzip(gfe)
Xref: usenetserver.com comp.databases.oracle.server:448554
X-Received-Date: Fri, 10 Oct 2008 05:53:14 EDT (text.usenetserver.com)

This is on 10gR2 standard edition.

We have a table defined like this:

txn_id
date_start
date_end
url_called

which contains a record for every time our application processes a
request from a browser. We would like to be able to spot any "gaps" in
the data - which would indicate a period when the service was
unavailable for whatever reason.

To do this we need to do a comparison between the date_start of each
row and the one that preceded (or followed)  it and then see if the
period of time is greater than a to-be-determined threshold.

Can a single SQL statement be constructed which could achieve this? if
so could you point me in the right direction? For those who haven't
followed what I was asking about, if you are in the majority then
please accept my apologies for not being more concise :)

regards,

--
jeremy
