Patrick Scharrenberg wrote:
> I'd like to merge this information to intervals where the service was up
> or down.
>
> < intervall, status >
> 10:13-10:15 up
> 10:16-10:16 down
> 10:17-1018 up
>
> I've no clue how to approach this problem.
About 12 hours ago
Hi!
I have a table where I repeatingly log the status of some service, which
looks something like this:
< timestamp, status >
Now, everytime my service is up I save the timestamp and a status of
"up", if it's down I save the timestamp with "down", eg:
10:13 up
10:14 u
Thanks all. I will try some of these suggestions.
On Sun, May 11, 2008 at 3:58 PM, Craig Ringer <[EMAIL PROTECTED]>
wrote:
> Mag Gam wrote:
>
> > I am trying to find the difference between the size column. So the
> > desired output would be
> >
> >ts | size| Diff
> > ---
Mag Gam wrote:
> I am trying to find the difference between the size column. So the
> desired output would be
>
>ts | size| Diff
> ---+-+--
> 2002-03-16| 11 | 0
>
> 2002-03-17| 15 | 4
> 2002-03-18| 18 | 3
> 2002-03-19
"Gurjeet Singh" <[EMAIL PROTECTED]> writes:
> On Sun, May 11, 2008 at 11:47 PM, Craig Ringer <[EMAIL PROTECTED]>
>> If you cannot assume that, you can use a subquery with limit and order
>> by to obtain the next record:
>>
>> SELECT
>> a.ts,
>> (SELECT b.size FROM x b WHERE b.ts > a.ts ORDER BY b.
On Sun, May 11, 2008 at 11:47 PM, Craig Ringer <[EMAIL PROTECTED]>
wrote:
> Mag Gam wrote:
>
> >
> >ts | size| Diff
> > ---+-+--
> > 2002-03-16| 11 | 0
> >
> > 2002-03-17| 15 | 4
> > 2002-03-18| 18 | 3
> > 2002-03-19|
Mag Gam wrote:
>
>ts | size| Diff
> ---+-+--
> 2002-03-16| 11 | 0
>
> 2002-03-17| 15 | 4
> 2002-03-18| 18 | 3
> 2002-03-19| 12 | -6
>
>
> I need the first column to be 0, since it will be 11-11. The second
> colum
On Sun, May 11, 2008 at 01:37:52PM -0400, Mag Gam wrote:
> Any thoughts about this?
1. will there be any gaps in between dates? if yes, what should be diff
be then?
2. can't you calculate it in client application?
3. is usage of pl/pgsql acceptable (i think this will be the fastest way
to do it in
On Sun, May 11, 2008 at 11:07 PM, Mag Gam <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have a view that generates output similar to this.
>
> select * from foo.view;
>
>ts | size
> ---+-
> 2002-03-16| 11
> 2002-03-17| 16
>
> 2002-03-18|
--- Mag Gam <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have a view that generates output similar to this.
>
> select * from foo.view;
>
>ts | size
> ---+-
> 2002-03-16| 11
> 2002-03-17| 16
> 2002-03-18| 18
> 2002-03-19| 1
Hi All,
I have a view that generates output similar to this.
select * from foo.view;
ts | size
---+-
2002-03-16| 11
2002-03-17| 16
2002-03-18| 18
2002-03-19| 12
I am trying to find the difference between the size column. So
11 matches
Mail list logo