Group By Time Stamp

From: Ariunbold Gerelt-Od <gereltod(at)kikakuya(dot)com>
To: PGSQL <pgsql-admin(at)postgresql(dot)org>
Subject: Group By Time Stamp
Date: 2002-03-25 07:25:23
Message-ID: 3C9ED0E3.8050403@kikakuya.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

I have a table Answers with fields answer_id integer,time_stamp timestamp.

How can I create a query that gives a sum of answer_id=ID ,but in every
2 hours.

For example:

answer_sum time_stamp

10 2002-03-24 20-22
12 2002-03-24 22-24
20 2002-03-25 00-02
4 2002-03-24 04-06

..............

and so on.

Browse pgsql-admin by date

  From Date Subject
Next Message Morten Sickel 2002-03-25 07:44:41 Re: Group By Time Stamp
Previous Message Jyry Kuukkanen 2002-03-25 07:11:35 Re: no drop column?!