Skip to content

Tag: string-concatenation

How can I use IF and CONCAT within SELECT

I have this Adjacency List Model table Table: Output: So I have the following query that duplicates a Site 1 e.g. and its children. In this case, the children are Paper with parent_id = 2 and ms1 with parent_id = 3 Output: As you can see Site 1 and its children got duplicated with a new unique id. However for

Presto equivalent of CONCAT_WS

I’m looking for a function in Presto to concat two columns with a separator like underline. Answer Your are looking here for the array_join function, see docs. array_join(x, delimiter, null_replacement) → varchar Concatenates the elements of the given array using the delimiter and an optional string to …