Client APIs
Basic API Usage
The most straight-forward manner of running SQL queries using DuckDB is using the `duckdb.sql` command.  
```python
import duckdb

duckdb.sql("SELECT 42").show()
```  
This will run queries using an **in-memory database** that is stored globally inside the Python module. The result of the query is returned as a **Relation**. A relation is a symbolic representation of the query. The query is not executed until the result is fetched or requested to be printed to the screen.  
Relations can be referenced in subsequent queries by storing them inside variables, and using them as tables. This way queries can be constructed incrementally.  
```python
import duckdb

r1 = duckdb.sql("SELECT 42 AS i")
duckdb.sql("SELECT i * 2 AS k FROM r1").show()
```