Opening the SQL editor
Access the SQL editor from the sidebar or toolbar. You can also ask the AI: “Open the SQL editor.”Querying spreadsheet data
Your sheet names act as table names, and column headers act as column names:Cross-sheet queries
Query across multiple sheets in the same workbook:Querying connected databases
When you have database connectors configured, select the data source from the dropdown at the top of the SQL editor, then write your query. Sourcetable runs the query on the remote database and returns results to your spreadsheet.Supported SQL features
Visual query builder
The query builder lets you construct queries without writing SQL:1
Select tables
Choose which sheets or connected tables to query from dropdown menus.
2
Pick columns
Select which columns to include in the output.
3
Add conditions
Build WHERE clauses with visual filter controls — select a column, operator (equals, contains, greater than, etc.), and value.
4
Configure joins
If querying multiple tables, define join conditions with visual dropdown selectors for left table, right table, and join columns.
5
Apply functions
Add aggregations, Excel-like functions (XL functions), and transformations.
6
Preview and run
See a live preview of your query results as you build. Click Run to execute.
Data library
Save frequently used queries for reuse:- Write and test your query
- Click Save to Library
- Name and categorize the query
- Access it later from the data library in the sidebar
AI-powered queries
Instead of writing SQL manually, ask the AI in natural language:- “Show me the top 10 products by revenue this quarter”
- “How many new customers signed up each month?”
- “What’s the average order value by customer segment?”