WITH t AS ( SELECT 1 id, '한국,중국,일본' v UNION ALL SELECT 2, '한국' UNION ALL SELECT 3, '중국,일본' UNION ALL SELECT 4, '대만,한국' ) , copy_t AS ( SELECT 1 lv UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 ) SELECT X , COUNT(*) cnt FROM (SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(v, ',', lv), ',', -1) x FROM t , copy_t WHERE lv <= LENGTH(v) - LENGTH(REPLACE(v, ',', '')) + 1 ) a GROUP BY x ;