I have a table of events (with id used as event id) like below (see also SQL fiddle here):
id
CREATE TABLE ext ( id CHAR(1), pid INT, sid INT,