CREATE TABLE PeriodQueueReportSummary_QueueMaxDuration
(
    id BIGINT UNSIGNED DEFAULT NULL AUTO_INCREMENT,
    Queue BIGINT UNSIGNED DEFAULT NULL,
    CallId VARCHAR(100) DEFAULT NULL,
    StartTs BIGINT UNSIGNED DEFAULT NULL,
    EndTs BIGINT UNSIGNED DEFAULT NULL,
    State ENUM("Queue", "Connected", "Abandonned") DEFAULT NULL,
    Duration INT UNSIGNED DEFAULT NULL,
    key(CallId),
    PRIMARY KEY ( id ),
    KEY ( Queue )

) ENGINE=INNODB CHARSET=UTF8 COMMENT="Max duration in queue for CallId";
