From: Joseph Shraibman <jks@selectacast.net>
To: Richard Huxton <dev@archonet.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: select by streak
Date: Thu, 21 Jun 2001 15:04:21 -0400
Message-ID: <3B324535.FF89D8D0@selectacast.net> (raw)
References: <3B30FB0A.3595CD79@selectacast.net>
<00ac01c0fa34$a9948460$1001a8c0@archonet.com>
Richard Huxton wrote:
>
> From: "Joseph Shraibman" <jks@selectacast.net>
>
> > Lets say I have a table like this:
> >
> > id int <== primary key
> > ts timestamp
> > name text
> > status char
> >
> > status is G for good or B for bad. How do I do something like:
> > SELECT name FROM mytable WHERE <last 3 entires in a row have status =
> > 'B'> and <has been no good ones in the past week> ?
>
> You're looking at a procedural solution here rather than SQL I'd suspect.
> Either do this in your application or look into plpgsql or pltcl.
That's what I was afraid of :(
--
Joseph Shraibman
jks@selectacast.net
Increase signal to noise ratio. http://www.targabot.com
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jks@selectacast.net, dev@archonet.com
Subject: Re: select by streak
In-Reply-To: <3B324535.FF89D8D0@selectacast.net>
* 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