delete from alias where itemid in (SELECT ID FROM ITEM WHERE INACTIVE = 1)