Skip to main content
Every query begins with FROM and SHOW. FROM names the dataset the report reads from, such as sales, inventory, or returns. SHOW lists the metrics you want to see, separated by commas.

Combining datasets

You can combine two datasets with + when you want metrics from both in one report, for example sales alongside current stock. The first dataset sets the grain and the second is joined onto it.
Rows are matched on the shared variant and location grain and outer-joined, so a row present in only one dataset is kept with the other side’s metrics zero-filled. See Units sold next to stock on hand for a worked example.

Renaming a column

Add AS "Label" after a metric to give its column a custom heading. The label is shown wherever the column appears, including exports.

Computed columns

SHOW also accepts computed columns built from metrics and numbers using +, -, *, and /. Multiplication and division bind tighter than addition and subtraction, and parentheses group. Division guards against divide-by-zero. Computed columns follow the plain metrics and usually carry an AS label.
Which metrics are available depends on the dataset you chose. See WHERE to narrow the rows and GROUP BY to break the results down by dimension.