I can't really tell the purpose of this query so it is hard to give you a way to do what you are wanting but I will try and help what I can.
as far as I know you can't delete data from querying a table, can only delete data in the create table script.
the problem with filtering it this way is it still calculates and looks at the double data so takes extra time just to be removed anyway, instead you can use the term distinct which will only grab the first instance of each unique value.
also as an extra thought it should not be possible to create double data in one table, the primary key should be such that double data shouldn't be possible.
ps: I'm no expert this is just my thoughts so sorry if I am wrong and didn't help just trying to give some of my knowledge on.