# Parametrize queries

### Parametrized reference

You can reference sheet data in SQL. Use {{}} notation for references. You can only reference single cells at a time.&#x20;

```sql
SELECT * FROM {{A1}} WHERE salary > {{A4}}
```

Note in the following example where the query output changes based on what table is selected in cell B1.&#x20;

### Parametrize a reference from another sheet

```sql
select abc from def where ghi="{{'Sheet_name'!H3}}"
```

<figure><img src="https://2438361843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff1Y5UzPF2x1oIzVJbUK8%2Fuploads%2F4wDa6sXwhPWTdTWA3iX0%2FCleanShot%202024-12-13%20at%2012.08.13%402x.png?alt=media&#x26;token=03b7cc0e-7b0e-47cd-ab6b-d9550f0a4928" alt=""><figcaption></figcaption></figure>
