Upon executing this SQL Statement:-
UPDATE `wp_ig_contacts`
INNER JOIN `wp_ig_lists_contacts` ON `wp_ig_contacts`.`id` = `wp_ig_lists_contacts`.`contact_id`
SET `wp_ig_contacts`.`updated_at` = "2021-07-06", `wp_ig_lists_contacts`.`status` = "unsubscribed"
WHERE `wp_ig_contacts`.`email` IN (SELECT `email` FROM `wp_ig_contacts_returned`)
If 1 email address belong to 1 group then 2 records will be updated:-
- 1 record in table “wp_ig_contacts” will be updated with `updated_at` = "2021-07-06"
- 1 record in table “wp_ig_lists_contacts” will be updated with `status` = "unsubscribed"
If 1 email address belong to 2 groups then 3 records will be updated:-