# Database Query Task

This is a task that allows executing SQL queries on a database connector.

When writing SQL queries, variable values can be used from the scenario context, such as data and variables, including [Script Internal Variables](../concept/script-internal-variables.md).

```
# SQL Example

Select * from LOT
where product='${variables.search.product}' // variables: Scenario input variables
  and operation='${data.lot.operation}' // data: Scenario execution data
  and factory='${domain.attributes.factory}' // domain: Current tenant information
```
