CREATE TABLE QueueStatusTimer
(
    id BIGINT UNSIGNED DEFAULT NULL AUTO_INCREMENT,
    Agent BIGINT UNSIGNED DEFAULT NULL,
    Status VARCHAR(30) DEFAULT NULL,
    Start BIGINT UNSIGNED DEFAULT NULL,
    End BIGINT UNSIGNED DEFAULT NULL,
    Duration INT UNSIGNED DEFAULT NULL,
    PRIMARY KEY ( id ),
    KEY ( Agent,End ),
    KEY ( Agent,Status,Start )
    /* @todo remove this index */

) ENGINE=INNODB CHARSET=UTF8 COMMENT="Time spent by agent in each status";
