I have data: timestamp, value.
CREATE TABLE cgl
(
id integer NOT NULL DEFAULT nextval('cgl_id_seq'::regclass),
ts integer,
value integer
)
I want to have minimum value from each 1 hour. There is unknown number of records per hour. I know more or less (rather less) I should use partition. Please point me to some examples or directions.