DELETE FROM CONTENT WHERE CONTENT.OJB_CONCRETE_CLASS = 'net.sourceforge.fenixedu.domain.DepartmentSite' AND CONTENT.KEY_UNIT IS NULL;
DELETE FROM NODE WHERE KEY_CHILD NOT IN (SELECT ID_INTERNAL FROM CONTENT);
DELETE FROM NODE WHERE KEY_PARENT NOT IN (SELECT ID_INTERNAL FROM CONTENT);