powered by
Run a SQL query on a DuckDB relation object
rel_sql(rel, sql)
the now aggregated duckdb_relation object
duckdb_relation
the DuckDB relation object
a SQL query to run, use _ to refer back to the relation
_
con <- DBI::dbConnect(duckdb()) rel <- rel_from_df(con, mtcars) rel2 <- rel_sql(rel, "SELECT hp, cyl FROM _ WHERE hp > 100")
Run the code above in your browser using DataLab