Loam

Query connected data

Use table names, filters, joins, and summaries to query data already available in your Loam workspace.

Start with the tables you can see

Use the dataset tree in the app sidebar to find your data, then open SQL Console (sign in to open this page). Uploaded tables and Loam's sample tables use the same SQL patterns.

Use the full table name

A table's SQL name is its full path from the workspace root. It can contain any number of dataset names followed by the table name. SQL calls each dataset component a namespace. Wrap each part in double quotes so the complete path stays explicit.

SELECT *
FROM "integrations"."stripe"."production"."orders"
LIMIT 25

If you are not sure how a table is named, read the table naming guide before writing a longer query.

Filter before you summarize

Add a WHERE clause before you calculate totals. This keeps the result focused and makes it easier to verify the numbers.

SELECT
  status,
  COUNT(*),
  SUM(amount)
FROM "sales"."uploads"."orders"
WHERE amount > 100
GROUP BY status

Join related tables

When two tables share an ID, join them to add the business context you need. Keep a positive row limit while using joins.

SELECT
  o.customer_id,
  o.amount,
  c.company_name
FROM "sales"."uploads"."orders" AS o
INNER JOIN "sales"."uploads"."customers" AS c
  ON c.customer_id = o.customer_id
LIMIT 20

Preview first

Before running a query across a large table, preview a few rows and check the column names. This catches spelling and type mistakes quickly.

SELECT *
FROM "sales"."uploads"."orders"
LIMIT 10

Query uploaded data

Use the dataset tree or SHOW RELATIONS IN integrations.stripe for the exact workspace-rooted table path. Preview the rows, then filter and summarize your uploaded data.

Troubleshooting

Loam says the table was not found

Check every dataset and table name in the full path, and wrap each part in double quotes. Loam does not insert a default dataset or search other datasets. If the table was just uploaded, wait for processing to finish and refresh the SQL Console.

The query returns too many rows

Add LIMIT while exploring, or add a WHERE clause to focus on a date range, status, customer, or region.

The result looks wrong

Run a preview query, confirm the column meanings, and group by one column at a time. Smaller checks make it easier to catch mismatched IDs or unexpected blank values.

Last updated 2026-08-21