New Query
Variables
Using variables
Add variables in SQL with {{var_name}}
.
When you type one, Lotus detects it and adds an input in the toolbar.
SELECT * FROM orders WHERE status = {{status}} AND created_at >= {{from_date}} AND total_amount >= {{min_amount}}
Types
- Text – plain strings (quoted for you)
- Number – integers/decimals
- Date – date picker, ISO date
Widgets
- Input – free text/number entry
-
Dropdown – choose one:
-
Static options –
one per line.
value
. -
SQL query –
return columns as
value, label
(or a singlevalue
column).
-
Static options –
one per line.
Labels & defaults
-
Label defaults to title-cased variable name
(e.g.
min_age
→ Min Age). - Default value is used if the toolbar input is empty.
Values are always sent as prepared parameters (no string interpolation), using your DB dialect’s placeholders.
To run your query, click on the Run button or press Ctrl + Enter
Here's where your results will appear