From: Ariunbold Gerelt-Od <gereltod@kikakuya.com>
To: PGSQL <pgsql-admin@postgresql.org>
Subject: Group By Time Stamp
Date: Mon, 25 Mar 2002 16:25:23 +0900
Message-ID: <3C9ED0E3.8050403@kikakuya.com> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: gereltod@kikakuya.com
Subject: Re: Group By Time Stamp
In-Reply-To: <3C9ED0E3.8050403@kikakuya.com>
References: <3C9ED0E3.8050403@kikakuya.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox