drop table if exists ECN;

create table ECN (
    ECNNumber integer primary key not null,
    IsTECN integer default 0,
    ExpirationDate text default '',
    ExtensionDate text default '',
    OriginatorID integer not null,
    Title text not null,
    Deleted integer default 0,
    Cancelled integer default 0,
    CloseDate text default ''
);

insert into ECN (ECNNumber, IsTECN, ExpirationDate, ExtensionDate, OriginatorID, Title)
values (1, 1, '2024-04-05 00:00:00', null, 1, 'title1'),
(2, 1, '2024-04-04 12:00:00', null, 6, 'title2'),
(3, 1, '2024-06-01 00:00:00', null, 4, 'title3'),
(4, 1, '2024-02-05 00:00:00', '2024-04-05 09:00:00', 3, 'title4'),
(5, 1, '2024-06-01 00:00:00', null, 4, 'title3'),
(6, 1, '2024-04-07 00:00:00', null, 9, 'title6'),
(7, 1, '2024-04-07 00:00:00', '2024-06-01 00:00:00', 13, 'title9'),
(8, 1, '2024-02-05 00:00:00', '2024-04-07 09:00:00', 3, 'title4'),
(9, 1, '2024-02-05 00:00:00', '2024-04-06 09:00:00', 3, 'title4')