Dear Srikanth,
You can solve your problem by doing this
THE SQL IS AS FOLLOWS
ASSUME TIME INTERVAL 2008-12-07 07:59:59 TO 2008-12-07 08:58:59 AND THE TABLE
NAME time_interval
COUNT (*) FROM
(select customer_id, log_session_id, start_ts, end_ts , end_ts-start_ts as
Interval from
James Kitambara wrote:
Dear Srikanth,
You can solve your problem by doing this
THE SQL IS AS FOLLOWS
ASSUME TIME INTERVAL 2008-12-07 07:59:59 TO 2008-12-07 08:58:59 AND THE
TABLE NAME time_interval
COUNT (*) FROM
(select customer_id, log_session_id, start_ts, end_ts ,
That did the job. Thanks.
Am new to SQL, does not even know that there exists an Operator called OVERLAPS.
Thanks Richard
../rssrik
--- On Tue, 17/3/09, Richard Huxton d...@archonet.com wrote:
From: Richard Huxton d...@archonet.com
Subject: Re: [SQL] SQL to Check whether AN HOUR PERIOD is
Dear all,
I have a table that records User Login Sessions with two timestamp fields.
Basically Start of Session and End of a Session (start_ts and end_ts). Each row
in the table identifies a session which a customer has used.
Data from the table (session):
-
Srikanth wrote:
Dear all,
I have a table that records User Login Sessions with two timestamp fields.
Basically Start of Session and End of a Session (start_ts and end_ts). Each
row in the table identifies a session which a customer has used.
Data from the table (session):