Skip site navigation (1) Skip section navigation (2)

Re: Sequential event query

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: Allan Kamau <allank(at)sanbi(dot)ac(dot)za>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Sequential event query
Date: 2008-06-25 17:12:43
Message-ID: 48627C8B.10200@pinpointresearch.com (view raw or flat)
Thread:
Lists: pgsql-sql
Steve Crawford wrote:
> Allan Kamau wrote:
>> Hi Steve,
>> Am having difficulties (there is a chance I could be the only one) 
>> trying to see how the results you've listed under "I would want to 
>> get:" section can be generated from the information you have provided 
>> in your implicit problem statement.
> Remember the events are listed chronologically. Stated verbosely:
>
> 1: Value 1 happened 1 sequential time
> 3: Value 3 happened 1 sequential time
> 1: Value 1 happened 1 sequential time
> 4:
> 4: Value 4 happened 2 sequential times ...
And for completeness I suppose I should state that I am aware that a run 
of, say, 4 sequential events includes runs of 1, 2 and 3 events. I'm 
only interested in the longest run in order to set thresholds.

Cheers,
Steve



In response to

pgsql-sql by date

Next:From: Mark StosbergDate: 2008-06-25 17:44:24
Subject: Re: GROUP BY on a column which might exist in one of two tables
Previous:From: Steve CrawfordDate: 2008-06-25 17:03:39
Subject: Re: Sequential event query

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group