Well that's probably down to the multiple join attempt!

DELETE FROM table RIGHT JOIN table2 ON table.col = table2.col WHERE something = somethingelse

You join on one primary key which identifies a row in one table as 'belonging to' a row in the other table. You delete based on values defined in the where clause. But please note that the join means you will be deleting the row from both tables which, I assume is not what you intend.

If you simply want to select a number of rows into a temporary table and then delete them from the source table then you simply have to use exactly the same FROM and WHERE statements with which you selected with a DELETE command. I see no point in the tangled web your second query has become!