--一行拆分行代码SELECT
SUBSTRING_INDEX(SUBSTRING_INDEX(st.product_patent_country,',',a.id+1),',',-1)AS product_patent_country,
esku ,st.saas_id
FROM saas_erp_product_center.tb_product st
JOIN sequence_table a ON a.id <(LENGTH(st.product_patent_country)-LENGTH(REPLACE(st.product_patent_country,',',''))+1)where st.is_newest =1and st.product_patent_country <>'否'AND st.delete_time ISNULLgroupby1,2,3