having对聚合函数的结果集进行过滤
SELECT rl.road_code,string_agg(distinct rs.tech_level_label, ',') from road_lst rl
left join road_section rs on rl.id = rs.road_id
where rs.tech_level_label is not null
GROUP BY rl.id
HAVING string_agg(tech_level_label, ',') like '%三级%'