Skip to contents

Combines two cohorts using UNION, INTERSECT, or DIFFERENCE.

Usage

combine_cohorts(
  con,
  new_cohort_id,
  cohort_id_a,
  cohort_id_b,
  operation = "UNION",
  name = NULL,
  description = NULL
)

Arguments

con

Active DuckDB DBI connection.

new_cohort_id

Target cohort ID.

cohort_id_a

First source cohort ID.

cohort_id_b

Second source cohort ID.

operation

Character: "UNION", "INTERSECT", or "DIFFERENCE".

name

Optional display name.

description

Optional description.

Value

Integer count of inserted records.