就是简单的一个字符串拼接,意义和所用场景自己体会下 insert into table agent_library1 select concat_ws(‘:‘,collect_set(name)) as name,contact,concat_ws(‘:‘,collect_set(company)) as company,concat_ws(‘:‘,collect_set(stores))as stores,concat_ws(‘:‘,collect_set(city)) as city,concat_ws(‘:‘,collect_set(street)) as street from (select name,company,city,concat_ws(‘:‘,collect_set(contact)) as contact,concat_ws(‘:‘,collect_set(stores))as stores,concat_ws(‘:‘,collect_set(street)) as street from agent_character1 group by name,company,city)a group by a.contact;
时间: 2024-10-12 12:07:55