UPDATE `log_all_sales_new` SET `payout_date` = NULL;
UPDATE `log_all_sales_new` \nSET \n    `payout_date` = DATE_ADD(`paid_on`, INTERVAL 1 MONTH)\nWHERE\n    `check_status` IN ('A' , 'S', 'Q')\n        AND `payout_date` IS NULL\n        AND `paid_on` IS NOT NULL;
UPDATE `log_all_sales_new` \nSET \n    `payout_date` = DATE_ADD(`transaction_date`, INTERVAL 2 MONTH)\nWHERE\n    `check_status` IN ('A' , 'S', 'Q')\n        AND `payout_date` IS NULL\n        AND `paid_on` IS NULL\n        AND `shop` IN (SELECT \n            `name`\n        FROM\n            `fin_shop_paid_exclusions`);
