SELECT 
    'UPDATE `log_all_sales_new` SET `payout_date` = NULL;' `query`
UNION ALL
SELECT 
    `query`
FROM
    `sponsorkliks`.`vw_update_payout_date`;