On Thu, 19 Aug 2004 [EMAIL PROTECTED] wrote:

> camp1 - smallint
> camp2 - smallint
> data  - timestamp
>
> si am nevoie sa grupez avg(camp1),avg(camp2) dupa data care trebuie
> sa fie rotunjita la sfert de ora.
>
>       Am cautat pe google, postgresql.org, si nu am gasit decat
> rotunjirea din date_trunc(), rotunjire ce se poate face la
> secunda/minut/ora, etc.

        SELECT camp1, camp2,
                (DATE_PART('epoch',timestamp)/(15*60))::int8*15*60
        FROM tabelacupricina
        GROUP BY camp1, camp2;

-- 
Any views or opinions presented within this e-mail are solely those of
the author and do not necessarily represent those of any company, unless
otherwise expressly stated.

--- 
Detalii despre listele noastre de mail: http://www.lug.ro/


Raspunde prin e-mail lui