What I mean is that I want to remove all rows in a table which are in that same table with another type. I tried to define this in a query but as I am selecting from the table where I also want to delete row from, the query cannot be processed.
Query:
DELETE FROM `user`
WHERE `user_id` IN (SELECT `user_id`
FROM `user`
WHERE `type` = 'x')
AND `type` = 'y';
How can I rewrite this query sothat this will work?