On Thu, 19 Aug 2004, Tarhon-Onu Victor wrote:
> SELECT camp1, camp2,
> (DATE_PART('epoch',timestamp)/(15*60))::int8*15*60
> FROM tabelacupricina
> GROUP BY camp1, camp2;
Eventual ca sa ai outputul tot timestamp:
SELECT camp1, camp2, ('1970-01-01 00:00:00'::timestamp +
((DATE_PART('epoch', date)/(15*60))::int8*15*60 ||
'seconds')::interval)::timestamp AS ckt
FROM tabelacupricina
GROUP BY camp1, camp2, ckt;
Poate-o fi si vreo metoda mai putin stufoasa insa nu o stiu eu,
pentru ca nu stiu cum sa aduc altfel un bigint la timestamp with sau
without timezone.
--
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/