Loam

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.

#regionproductamountquarter
1USWidget1200Q1
2USGadget850Q1
3USWidget1450Q2
4USGadget920Q2
5EUWidget980Q1

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 5 returns 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 10

Next steps

Next, learn how dataset paths identify tables, then try filters, joins, and summaries:

Last updated 2026-08-21