37 lines
979 B
SQL
37 lines
979 B
SQL
-- Normalize company industry names used by the dashboard industry analysis.
|
|
-- The backend treats these three names as the canonical categories:
|
|
-- 食品加工、纺织服装、装备制造
|
|
|
|
UPDATE company
|
|
SET industry = '食品加工'
|
|
WHERE del_flag = '0'
|
|
AND industry IS NOT NULL
|
|
AND (
|
|
industry IN ('食品产业', '食品加工', '绿色有机食品', '食品/饮料/酒水')
|
|
OR industry LIKE '%食品%'
|
|
OR industry LIKE '%饮料%'
|
|
OR industry LIKE '%酒%'
|
|
);
|
|
|
|
UPDATE company
|
|
SET industry = '纺织服装'
|
|
WHERE del_flag = '0'
|
|
AND industry IS NOT NULL
|
|
AND (
|
|
industry = '纺织服装'
|
|
OR industry LIKE '%纺织%'
|
|
OR industry LIKE '%服装%'
|
|
);
|
|
|
|
UPDATE company
|
|
SET industry = '装备制造'
|
|
WHERE del_flag = '0'
|
|
AND industry IS NOT NULL
|
|
AND (
|
|
industry = '装备制造'
|
|
OR industry LIKE '%装备%'
|
|
OR industry LIKE '%制造%'
|
|
OR industry LIKE '%机械%'
|
|
OR industry LIKE '%设备%'
|
|
);
|