rel_sql: Run a SQL query on a DuckDB relation object

rel_sqlR Documentation

Run a SQL query on a DuckDB relation object

Description

Run a SQL query on a DuckDB relation object

Usage

rel_sql(rel, sql)

Arguments

rel

the DuckDB relation object

sql

a SQL query to run, use _ to refer back to the relation

Value

the now aggregated duckdb_relation object

Examples

con <- DBI::dbConnect(duckdb())
rel <- rel_from_df(con, mtcars)
rel2 <- rel_sql(rel, "SELECT hp, cyl FROM _ WHERE hp > 100")

duckdb documentation built on Sept. 20, 2022, 9:07 a.m.