Learn R Programming

TKCat (version 1.2.3)

ch_union_query: Build a ClickHouse UNION query from several sub-queries

Description

Wraps each input sub-query as a derived table and combines them with UNION DISTINCT or UNION ALL. A single sub-query is returned wrapped but without any UNION clause.

Usage

ch_union_query(queries, mode = c("DISTINCT", "ALL"))

Value

A character string with the assembled UNION query.

Arguments

queries

a character vector of SELECT sub-queries to combine

mode

the union mode: "DISTINCT" (default) to deduplicate rows across sub-queries, or "ALL" to keep every row

See Also

ch_join_query()