problem with sql

From: Ricardo Javier Aranibar León <ricardo_jal(at)hotmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: problem with sql
Date: 2002-06-01 00:32:00
Message-ID: F73dSdVudU5N3FwtFR30000b12b@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi list,

I think that my head will exploit, I can't resolve this problem and I hope
that somebody can help me.
My data base stores the statistics of ping that are generated every minute.
For a day I have 1440 registers, I want to group them every 5 minutes.
I use this:
hb#select sum(tras), sum(lost), avg(min), avg(prom), avg(max) from simon
where fecha='2002-05-31' and ip='166.114.214.22' and hora between '00:00'
and '00:05';

This work for five register, but i like that this function as a bucle every
5 minutes for example in the next report the interval of hora between
'00:05' and '00:10' the next hora between '00:10' and '00:15'.....until
arrive hora between '23:55' and '24:00'

If somebody can help me I will thankfull

_________________________________________________________________
Descargue GRATUITAMENTE MSN Explorer en
http://explorer.yupimsn.com/intl.asp.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jorg Janke 2002-06-01 04:11:44 Any way to handle exceptions in PL/pgSQL ?
Previous Message Marc G. Fournier 2002-05-31 14:57:44 Re: http://www.postgresql.org/idocs/ PROBLEM!