drop table if exists UserSubRole;

create table UserSubRole (
    UserSubRoleID integer primary key,
    UserID integer not null,
    SubRoleID integer not null,
    Delegated integer default 0
);

insert into UserSubRole (UserID, SubRoleID, Delegated)
values (15, 1, 0),
(34, 19, 0),
(2, 5, 0),
(19, 3, 0),
(3, 5, 1),
(4, 2, 1);