How to query for Interval - Mailing list pgsql-novice

From Vishal Kashyap
Subject How to query for Interval
Date
Msg-id 77b69d210604111353o7b7213d4q604fe21212507826@mail.gmail.com
Whole thread Raw
Responses Re: How to query for Interval  (Richard Broersma Jr <rabroersma@yahoo.com>)
Re: How to query for Interval  (Richard Broersma Jr <rabroersma@yahoo.com>)
Re: How to query for Interval  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List 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

pgsql-novice by date:

Previous
From: Alasdair Young
Date:
Subject: Re: Indexes slower when used in decending vs. ascending
Next
From: Tom Lane
Date:
Subject: Re: Indexes slower when used in decending vs. ascending order?