I want to compute a new column c1, which is the collect_set of column typpl, then concat the result of collect_set, finally delete escape from result. In Hive the query is:
select distinct numcat,numpl,numcr, natcat, cdvign, translate(concat_ws('!',collect_list(cast(typpl as string)) over(partition by numcat,numpl,numcr, natcat, cdvign) ), ' ','') c1 from db.table
How can I convert this query ( concat_ws and collect_list ) in Bigquery standard SQL?