On Tue, 23 Jun 2009 04:41:44 +1000, Mike Toews wrote:
Window functions appear to be the best solution for this style of
problem, and I'm looking forward to their applications. However, I'm
sticking with 8.3 for at least a year, so I'm not able to explore this
solution yet. For now, I can on
Scott Marlowe wrote:
On Mon, Jun 15, 2009 at 12:23 PM, Mike Toews wrote:
This is easy to compute using a spreadsheet or in R, but how would I do this
with SQL? I'm using 8.3. Advice is appreciated.
FYI (and I'm no expert in this area) R is available as a pl for
postgres, look for pl/R
On Mon, Jun 22, 2009 at 12:41 PM, Mike Toews wrote:
> Hi Joel,
> An excellent book that I recently stumbled on is /Joe Celko's SQL for
> Smarties/ (recommended by someone on this list), which is a heavy read, but
> has an amazing depth to ANSI SQL. Of particular interest is "Chapter 24:
> Regions,
Hi Joel,
Window functions appear to be the best solution for this style of
problem, and I'm looking forward to their applications. However, I'm
sticking with 8.3 for at least a year, so I'm not able to explore this
solution yet. For now, I can only post-process the output in a non-SQL
environ
On Mon, Jun 15, 2009 at 12:23 PM, Mike Toews wrote:
> This is easy to compute using a spreadsheet or in R, but how would I do this
> with SQL? I'm using 8.3. Advice is appreciated.
FYI (and I'm no expert in this area) R is available as a pl for
postgres, look for pl/R or plR
--
Sent via pgsql-ge
Hi Mike,
I happened upon your query, which is related to some stuff I've been
playing with.
Firstly, David's solution below doesn't work. I haven't yet tried to work
out why.
Secondly, I was hoping to be able to solve your problem nicely with
Postgres 8.4's window functions [1,2], which provide
Hi Mike,
I happened upon your query, which is related to some stuff I've been
playing with.
Firstly, David's solution below doesn't work. I haven't yet tried to work
out why.
Secondly, I was hoping to be able to solve your problem nicely with
Postgres 8.4's window functions [1,2], which can prov
On Mon, Jun 15, 2009 at 2:23 PM, Mike Toews wrote:
> Hi,
>
> I'm having difficulty constructing a query that will find breaks where data
> change in a time-series. I've done some searching for this too, but I
> haven't found anything.
>
> Here is my example situation, consider my source table:
> da
Hi,
I'm having difficulty constructing a query that will find breaks where
data change in a time-series. I've done some searching for this too, but
I haven't found anything.
Here is my example situation, consider my source table:
datebin
2009-01-01 red
2009-01-02 red
2009-01-03