CREATE TABLE stats_channels (
  event       VARCHAR(64) NOT NULL,
  timestamp   DATETIMEOFFSET NOT NULL,
  channel_id  BIGINT      NOT NULL REFERENCES channels (id),
  count       BIGINT NOT NULL DEFAULT 0,
  PRIMARY KEY(event, timestamp)
);
