R: Run a SQL query on a DuckDB relation object

rel_sql {duckdb} | R 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")

[Package duckdb version 0.4.0 Index]