The following
delete from child N
where parent_id in
(select parent_id , count(*) c
from parent
group by other_attribute having c > 1 )
understandably returns
Operand should contain 1 column(s)
How do you fix it ?
Modify your query to be
delete from child
where parent_id in (
select parent_id
from parent
group by other_attribute
having count(*) > 1 )
(OR)
Make it a JOIN query saying
delete child
from child
join (
select parent_id
from parent
group by other_attribute
having count(*) > 1 ) xxx on child.parent_id = xxx.parent_id;