Write your first query
Open the SQL Console, write a simple SELECT query, and see results from your data.
Open the SQL Console
Go to SQL Console (sign in to open this page) from the sidebar. You'll see an editor where you can type SQL and a results area below it.
Your first query
The simplest way to start is with a SELECT statement. If your workspace includes Loam's sample data, try the query below. It returns up to five rows so you can see what the data looks like. Otherwise, choose a table path from the app sidebar.
| # | region | product | amount | quarter |
|---|---|---|---|---|
| 1 | US | Widget | 1200 | Q1 |
| 2 | US | Gadget | 850 | Q1 |
| 3 | US | Widget | 1450 | Q2 |
| 4 | US | Gadget | 920 | Q2 |
| 5 | EU | Widget | 980 | Q1 |
Breaking it down
SELECT *returns all columns from the table.FROM "analytics"."sales"is the table's full path from the workspace root. The first part is the dataset and the final part is the table. In SQL, a dataset path component is called a namespace. Each name is wrapped in double quotes.LIMIT 5returns up to five rows. This is helpful when you're exploring a table for the first time and don't want to load thousands of rows.
Running the query
In the SQL Console, select Run query or press Ctrl+Enter (⌘+Enter on Mac). Results appear in the table below the editor.
Filtering results
Add a WHERE clause to narrow your results. For example, to see only sales over $200:
SELECT * FROM "analytics"."sales"
WHERE amount > 200
LIMIT 10Next steps
Next, learn how dataset paths identify tables, then try filters, joins, and summaries:
- Learn how table names work in the table naming guide.
- See practical examples in querying connected data.
Related articles
Last updated 2026-08-21