select id from addresses where id not in (select * from ((select address_id as 'id' from orders) union (select shipping_address_id as 'id' from orders) union (select address_id as 'id' from customers) union (select shipping_address_id as 'id' from customers) order by id) as ui);
No comments:
Post a Comment