When I run this query in MySQL it deletes records it deletes only /nas which is wanted done. I also hardcoded the values for NOT IN sub-select statement and deletes only /nas. But, when I use the place holder in my code, for some reason it deletes all records.
I guess, I will try debugging...