Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 92626475C2E for ; Fri, 31 May 2002 20:31:58 -0400 (EDT) Received: from hotmail.com (f73.law9.hotmail.com [64.4.9.73]) by postgresql.org (Postfix) with ESMTP id 79288475C04 for ; Fri, 31 May 2002 20:31:57 -0400 (EDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 31 May 2002 17:32:00 -0700 Received: from 64.7.127.220 by lw9fd.law9.hotmail.msn.com with HTTP; Sat, 01 Jun 2002 00:32:00 GMT X-Originating-IP: [64.7.127.220] From: "=?iso-8859-1?B?UmljYXJkbyBKYXZpZXIgQXJhbmliYXIgTGXzbg==?=" To: pgsql-sql@postgresql.org Subject: problem with sql Date: Sat, 01 Jun 2002 00:32:00 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Message-ID: X-OriginalArrivalTime: 01 Jun 2002 00:32:00.0879 (UTC) FILETIME=[BEB39FF0:01C20903] X-Archive-Number: 200205/330 X-Sequence-Number: 7965 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.