create table transport (
id serial,
enginenumber varchar(10),
carcassnumber varchar(10)
);
insert into transport(enginenumber, carcassnumber) values('A', 'B');
insert into transport(enginenumber, carcassnumber) values('A', 'C');
insert into transport(enginenumber, carcassnumber) values('A', 'B');
insert into transport(enginenumber, carcassnumber) values('A', 'B');
insert into transport(enginenumber, carcassnumber) values('A', 'B');
insert into transport(enginenumber, carcassnumber) values('A', null);
insert into transport(enginenumber, carcassnumber) values('A', 'B');
insert into transport(enginenumber, carcassnumber) values(null, 'B');
insert into transport(enginenumber, carcassnumber) values('A', null);
insert into transport(enginenumber, carcassnumber) values('A', null);
insert into transport(enginenumber, carcassnumber) values(null, 'B');
insert into transport(enginenumber, carcassnumber) values(null, 'B');