redshift sql纠正：
SELECT
CONCAT(DATE_FORMAT(DATE_ADD(TS.ad_date, INTERVAL 1 DAY), '%xW%v'), 
'(', 
DATE_FORMAT(DATE_SUB(STR_TO_DATE(CONCAT(DATE_FORMAT(DATE_ADD(TS.ad_date, INTERVAL 1 DAY), '%xW%v'), ' Monday'), '%xW%v %W'), INTERVAL 1 DAY), '%m/%d'), '-', 
DATE_FORMAT(DATE_SUB(STR_TO_DATE(CONCAT(DATE_FORMAT(DATE_ADD(TS.ad_date, INTERVAL 1 DAY), '%xW%v'), ' Sunday'), '%xW%v %W'), INTERVAL 1 DAY), '%m/%d'), ')') AS first_col
FROM
ad_sp_report_search_term_sync TS
INNER JOIN (SELECT id, keyword_target_id, query FROM ad_sp_report_search_term_sync WHERE id = 12763934) TSS ON TSS.keyword_target_id = TS.keyword_target_id AND TSS.query = TS.query
WHERE TS.ad_date BETWEEN '2023-10-01' AND '2023-10-31'
GROUP BY DATE_FORMAT(DATE_ADD(TS.ad_date, INTERVAL 1 DAY), '%xW%v'))