
The query editor uses DuneSQL, a Trino-based engine optimized for blockchain data. For syntax details, supported functions, and data types, see the SQL Query Engine documentation.
Toolbar
The toolbar sits above the code editor and provides quick access to common actions.Editor settings
Click the Settings (gear icon) in the top-right corner of the editor panel to customize your coding environment.Writing and executing queries
Autocomplete
The editor provides context-aware autocomplete for DuneSQL keywords, table names, and column aliases already referenced in your query. To manually trigger the autocomplete menu at any time, pressCtrl/Cmd + Space.
Running queries
Click the Run button (or pressCtrl + Enter) to execute your query. Results appear in the results panel below the editor.
The Try API button next to Run generates an API endpoint for your query results, making it easy to integrate Dune data into external applications. See the API documentation for more.
Run selection
You can execute a specific portion of a query instead of the full statement. This is useful for testing subqueries, debugging intermediate results, or validating individual CTEs. Highlight the portion of the query you want to run. The Run button updates to Run selection, and only the highlighted SQL is executed.
Error handling
When a query fails, a red error banner appears at the top of the editor with details about the failure. Error messages include:- Error type — e.g.,
COLUMN_NOT_FOUND,SYNTAX_ERROR - Line and character position — the exact location of the issue in your SQL
- Description — a human-readable explanation of the problem
Keyboard shortcuts
Shortcuts are based on US/UK keyboard layouts and may vary depending on your device’s language settings.
Query results
Query results appear in a table below the editor after execution.- Sort by clicking any column header. Click once for ascending order, click again for descending.
- Paginate through results using the page controls. Each page displays 25 rows.
- Search across all result rows using the search bar below the results table.

Column formatting
Each column in the results table can be individually configured without modifying your SQL:
For full details on table formatting options, including progress bars and advanced number formats, see the Formatting Tables documentation.