Re: Given a set of daterange, finding the continuous range that includes a particular date (aggregates)

2018-02-28 Thread mariusz
hi, On Tue, 2018-02-27 at 16:15 -0800, Ken Tanzer wrote: > Hi. Thanks so much for your assistance. This is definitely getting > the results I was looking for. It is still syntacticallly more > cumbersome than I might have hoped, but I can work with it. So I've > got two follow questions/issue

Re: Given a set of daterange, finding the continuous range that includes a particular date (aggregates)

2018-02-27 Thread Ken Tanzer
Hi. Thanks so much for your assistance. This is definitely getting the results I was looking for. It is still syntacticallly more cumbersome than I might have hoped, but I can work with it. So I've got two follow questions/issues: 1) I can see there are many, more complex, options for aggrega

Re: Given a set of daterange, finding the continuous range that includes a particular date (aggregates)

2018-02-27 Thread mariusz
hello, one more fix, to not let someone get incorrect/incomplete ideas, see below On Tue, 2018-02-27 at 10:03 +0100, mariusz wrote: > On Fri, 2018-02-23 at 18:11 -0800, Ken Tanzer wrote: > > On Fri, Feb 23, 2018 at 6:10 AM, > > mariusz wrote: > > > > > >

Re: Given a set of daterange, finding the continuous range that includes a particular date (aggregates)

2018-02-27 Thread mariusz
On Tue, 2018-02-27 at 10:03 +0100, mariusz wrote: > On Fri, 2018-02-23 at 18:11 -0800, Ken Tanzer wrote: > > On Fri, Feb 23, 2018 at 6:10 AM, > > mariusz wrote: > > > > > > i guess, you can easily get max continuous range for each row > > with >

Re: Given a set of daterange, finding the continuous range that includes a particular date (aggregates)

2018-02-27 Thread mariusz
On Fri, 2018-02-23 at 18:11 -0800, Ken Tanzer wrote: > On Fri, Feb 23, 2018 at 6:10 AM, > mariusz wrote: > > > i guess, you can easily get max continuous range for each row > with > something like this: > > CREATE OR REPLA

Re: Given a set of daterange, finding the continuous range that includes a particular date (aggregates)

2018-02-23 Thread Ken Tanzer
> > On Fri, Feb 23, 2018 at 6:10 AM, mariusz wrote: > i guess, you can easily get max continuous range for each row with > something like this: > > CREATE OR REPLACE FUNCTION > append_daterange(d1 daterange, d2 daterange) > RETURNS daterange > LANGUAGE sql > AS >