01The Goal-First Language

Stop describing data.
Start declaring outcomes.

SmashGL is a declarative, goal-aware query language. You express the outcome you want — a target, a window, a condition — and the system evaluates progress, forecasts attainment, and renders the result.

A query language
that knows what
success looks like.

Three layers — intent, evaluation, visualization — collapsed into a single declarative form. Below: a SmashGL query in flight.

Statement Compile Evaluate Render GOAL PLAN STATE VIZ SMASH metric GOAL grow +10% last 30 days Threshold IR Window IR Forecast IR value: 47,300 progress: 86% status: on-pace arc delta forecast
Fig. 1 — the SmashGL pipeline.

“Data isn't truth.
Goal achievement is.”

— The SmashGL premise Read the syntax

For thirty years analytics languages have answered what happened. SmashGL answers whether you're winning — by treating goals as first-class objects in the query itself.

02Premise Why a new language at all

Three truths the existing analytics stack cannot express on its own.

A — Intent

Goals are absent from the query.

SQL retrieves rows. It has no opinion about whether those rows represent success. Every dashboard hand-codes that opinion in brittle UI logic.

B — Time

Windows aren't typed.

"This quarter," "rolling 30 days," and "BFCM weekend" are first-class concepts in business — and second-class strings in every existing query language.

C — Render

Visualization is decoupled.

The query doesn't know how it should be drawn. So humans build dashboards by hand, repeating the same arc-gauge-pill grammar for every metric.

03Before / After The same question, two languages

Same intent. One language asks what; the other asks whether.

Before — descriptive

"What were our net sales this month?"

SELECT SUM(net_sales)
FROM   sales
WHERE  created_at >= date_trunc('month', now());

-- ...then a human decides
-- whether the number is good.
After — declarative goal

"Are we on track to hit $50K this month?"

GOAL   hit revenue >= $50,000 this month
COMPARE previousYear
SOURCE shopify.sales.net_sales AS revenue
SMASH  metric WITH alert TITLED "March Revenue"

The right column compiles to the left, then computes status, forecast, and gap automatically.

04Anatomy Ten clauses — that's the whole language

A small grammar with large implications.

SMASH Visualization, flags & title Declares how the result should be rendered — metric, sparkline, gauge, bar, table. Flags listed after WITH are the only ones active; omit WITH for all-active default. TITLED "…" sets the card title.
GOAL Verb, target & window Verb-based outcome: grow, reduce, hold, hit, or cap. Time phrase embedded inline — this month, last 30 days, etc. Supports SOFT/HARD commitment and compound AND/OR conditions. Drives every downstream evaluation.
SOURCE Live data binding Fully-qualified path — namespace.table.column AS alias. Refined with WHERE, GROUP BY, ORDER BY, LIMIT. The alias is the metric name GOAL refers to.
DATA Inline static data Embed values directly — DATA alias = {…} with optional PREVIOUS {…} for comparison. No engine call. Used for demos, dev cards, and marketing samples.
WINDOW Standalone time phrase Used only when no GOAL is present. Natural-language phrases: this month, last 90 days, from 2026-11-27 to 2026-11-30. Rolling, named, or fixed.
COMPARE Comparison mode previousPeriod, previousYear, sameDayLastWeek — the comparison is part of the question, not derived after the fact.
TYPE Metric type cumulative, ratio, or level. Controls whether FORECAST extrapolates linearly or uses the current value as-is.
DIRECTION Higher or lower Declares whether higher or lower values are better. Inverts attainment calculation, gap sign, and TREND pill colour. Inferred from the verb and column name when omitted.
FORMAT Display unit percent, currency, or number. Optional — inferred from column metadata. Use when inference is wrong, e.g. rate metrics that should display as a percentage.
SMOOTH Sparkline shape rolling7, rolling14, rolling30, ema7, ema14 — the smoothing belongs to the query, not the renderer. Affects trend line only; headline KPI is unchanged.
05Reach out

Building
with goals?

SmashGL is a patent-pending language and reference implementation. We're talking with implementers, partners, and licensees.