select workplace as name, count(1) as value from( select regexp_replace(b.workplace, '厦门市', '') as workplace from job lateral view explode(split(workplace, '、|,')) b AS workplace ) as a where workplace rlike '湖里|海沧|思明|集美|同安|翔安' group by workplace;
时间: 2023-12-23 21:05:03 浏览: 88
PyPI 官网下载 | workplace_extractor-0.7.16.5.tar.gz
好的,我已经将你提供的HQL语句转换成了MySQL的SQL语句,如下所示:
```
SELECT regexp_replace(b.workplace, '厦门市', '') AS name, COUNT(1) AS value
FROM job
LATERAL VIEW explode(split(workplace, '、|,')) b AS workplace
WHERE workplace REGEXP '湖里|海沧|思明|集美|同安|翔安'
GROUP BY name;
```
请注意,这里使用了MySQL中的REGEXP函数,其作用是匹配正则表达式,用来替代HQL中的rlike关键字。
阅读全文