Skip to main content
This page covers running queries in the Query Editor and working with their results. For the editor itself - tabs, formatting, find & replace, and the Schema Explorer - see Query editor.

Run a query

Open SQL Editor in your workspace. In the action bar above the editor, choose a Catalog, Database, and Cluster you can use. Your workspace role needs permission to run SQL.
  • Click Run, or press Cmd/Ctrl + Enter.
  • Stop a query: while it runs, the Run button becomes Cancel - click it (or press Cmd/Ctrl + Esc).
If the selected cluster is suspended, you’re asked to confirm before it resumes.

Run one SQL statement

Paste these two statements into the same editor tab. They use sample values, so you can try them without a customer table:
  1. Highlight the complete second statement and click Run. Under sample_name, you should see comparison.
  2. Highlight both statements, click Run again and wait for both to finish. In the results pane, select the first statement to see baseline. Select the second to see comparison.
How do I run one statement without highlighting it? Place the cursor inside that statement and click Run. To run several statements in order, highlight them together, including the semicolons between them. If a partial selection gives a syntax error, highlight the complete statement and try again.

Set a default row limit

Setting a limit prevents accidentally running an unbounded query, which can drive up cost. Use the dropdown next to Run: The Query Editor displays only the first 10,000 rows - see Working with large result sets for more.

Query status

As a query runs, its status moves through: Connecting → Planning → Executing → Fetching result → Success (or Failed on error).

The results pane

The Results Pane appears below the editor after a run.
  • Single statement: a single results table, with a summary bar showing Execution Time, Row Count, and Query Status.
  • Multiple statements: the pane splits into a query list (one row per statement, with status, query text, and row count) and a results view for the selected statement.

How do I find the result for a particular statement?

If you ran several statements together, click the row with the matching SQL in the query list below the editor. The results view shows the output for that statement. With one statement, the result appears directly. To find that run again, click Execution Time in its result header when shown. In Execution Details, copy Query ID. In Run History in the same workspace, choose a time range that includes your run. Open the Query ID filter, paste the ID and select Apply. Run History filters.

Check an aggregate using four sample orders

In a fresh SQL Editor tab, choose your cluster, catalog and database. Run this statement. Each amount is in whole dollars.
Read the three rows in this order. For each status, check the order count and total amount:
  • paid: 2 orders, 20 dollars
  • pending: 1 order, 7 dollars
  • refunded: 1 order, 5 dollars
If you see baseline or comparison, return to the tab where you ran the orders query. Copy the Query ID from Execution Details. Run the same query again and copy the second Query ID. The totals should match and the IDs should differ. In Run History, filter by the first full ID and open the matching run. Check that its Query ID matches the first one you saved.

Execution details

Open a query’s execution details for a full breakdown: final status, the executed SQL, rows returned and wall time, an overview (Query ID, Run By, cluster name and size), and a Total Elapsed Time bar split into planning, queueing, and execution time, plus result fetching time by the client.

Query execution plan

Click Show Execution Plan to open the Query Profile - a visual map of how the engine ran your query. Review the most expensive nodes and each step’s cost percentage, and use the zoom controls to navigate. Click Hide Execution Plan to return to the results.

Results output

To copy one value, select its cell in the results table.

How do I download a query result as a CSV?

A CSV is a text file you can open in a spreadsheet. Use Download CSV to save the rows loaded in the editor for one successful statement.
  1. Run this sample and wait for Success:
  2. If you ran several statements, select the one containing sample_id in the results pane.
  3. In the results header, choose the download icon labeled Download CSV. Open the file and check that it contains 42 under sample_id and checked under sample_status. If the values differ, check the selected statement.
Why can’t I see Download CSV? Check the status of the selected statement. If it is still running, wait for Success. If it failed, open its error message and follow the Query Editor error guide.

Working with large result sets

The browser displays up to 10,000 rows. A SQL LIMIT or the editor row limit can reduce that number further. To export more rows, first check the limit and filters in your SQL, then choose where you want the data:
  • In your application: Use a supported connector to fetch the full result.
  • In cloud object storage: Use COPY INTO. To run it from Query Editor, you need the DataExport role and access to the storage destination.
To check that an export is complete, compare its data row count with the count you expect for the same filters.

Data preview

Data Preview returns the first 10 rows of a table or column for a quick look before you write a query. In the Schema Explorer, hover over a table or column, click the kebab (⋮), and select Data Preview - a new tab opens with the sample rows.

Cross-catalog and cross-schema queries

You can combine data from different schemas and catalogs in a single query for a unified view of your data. Fully qualify each table with its catalog, schema, and table name:
catalog_name is the name you gave the catalog when you created it in e6data. For Unity catalogs, it’s the catalog created under Unity in Databricks. For a worked example, see Join orders and customers from two catalogs.

See also

Last modified on November 24, 2026