Run a read-only SQL query
queryRetrieve data from the motorcycle-loan warehouse with read-only SELECT or WITH queries. Use placeholders for parameters and automatically limited results.
Instructions
Execute a read-only SELECT/WITH SQL query against the DuckDB warehouse and return the rows. Tables live in the 'main' schema (e.g. dms_customer, dms_contract, dms_contact_note, los_loan_app). A LIMIT is applied automatically if you omit one. Use ? placeholders with the params array for values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A single read-only SELECT or WITH statement. | |
| params | No | Positional parameters bound to ? placeholders in the SQL. | |
| max_rows | No | Maximum rows to return (default 200). |