How to query for Interval

From: "Vishal Kashyap " <vishalonlist(at)gmail(dot)com>
To: "PostgreSQL Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: How to query for Interval
Date: 2006-04-11 20:53:12
Message-ID: 77b69d210604111353o7b7213d4q604fe21212507826@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

I have a table with time stamps in it . These timestamp represent a event count.
I just wanted to know how could I query such that I get a count of
event per hour.

Table structure is

my_table(id serial, time_event timestamp,event varchar(200));

I want to do something like
select count(id) from my_table where time_event in (every 1 hour);

Any pointers / help would be appreciated

--
With Best Regards,
Vishal Kashyap.
http://www.vishal.net.in

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2006-04-11 20:54:06 Re: Indexes slower when used in decending vs. ascending order?
Previous Message Alasdair Young 2006-04-11 20:40:52 Re: Indexes slower when used in decending vs. ascending