DROP TABLE IF EXISTS value_by_hour;
CREATE TABLE value_by_hour (
  property  BIGINT    NOT NULL,
  timestamp TIMESTAMP NOT NULL,
  count     NUMERIC   NOT NULL,
  max       NUMERIC   NOT NULL,
  min       NUMERIC   NOT NULL,
  avg       NUMERIC   NOT NULL
);

DROP TABLE IF EXISTS value_by_minute;
CREATE TABLE value_by_minute (
  property  BIGINT    NOT NULL,
  timestamp TIMESTAMP NOT NULL,
  count     NUMERIC   NOT NULL,
  max       NUMERIC   NOT NULL,
  min       NUMERIC   NOT NULL,
  avg       NUMERIC   NOT NULL
);
