CREATE TEMPORARY TABLE X AS SELECT NODE.ID_INTERNAL FROM NODE INNER JOIN CONTENT ON NODE.KEY_PARENT = CONTENT.ID_INTERNAL WHERE NODE.OJB_CONCRETE_CLASS LIKE '%EXPLICITORDERNODE' AND CONTENT.OJB_CONCRETE_CLASS LIKE '%BOARD';
DELETE FROM NODE WHERE ID_INTERNAL IN (SELECT ID_INTERNAL FROM X);
DROP TABLE X;

CREATE TEMPORARY TABLE X AS SELECT NODE.ID_INTERNAL FROM NODE INNER JOIN CONTENT ON NODE.KEY_PARENT = CONTENT.ID_INTERNAL WHERE NODE.OJB_CONCRETE_CLASS LIKE '%EXPLICITORDERNODE' AND CONTENT.OJB_CONCRETE_CLASS LIKE '%ANNOUNCEMENT';
DELETE FROM NODE WHERE ID_INTERNAL IN (SELECT ID_INTERNAL FROM X);
DROP TABLE X;