Skip to content

Verb reference

Pack standard version 1.0. Generated from each verb's contract, so it cannot drift from what the analyser accepts: every example below is executed by the contract-completeness tests. For a narrative tour, see Standard verbs.

In a syntax line, [..] is optional, <TYPE> is a value of that type and a|b are the operators the attribute accepts.

Structure facts

Answered from the catalog; no data is scanned.

EXISTS

The table, or the named column of it, exists in the catalog.

EXISTS <table> [COLUMN <SYMBOL>]
attribute value type operators required meaning
COLUMN SYMBOL none no column that must exist in the table
  • Mode: answered from the catalog.
  • Facts: exists.
  • Does not accept a WHERE filter.
EXISTS orders
EXISTS shop.orders
EXISTS orders COLUMN amount
does not compile diagnostic
EXISTS FL301
EXISTS orders WHERE status = 'paid' FL308
EXISTS orders COLUMN 5 FL305
EXISTS orders COLUMN >= amount FL306
EXISTS orders.id.x.y FL302

TYPE

The column's type family equals the stated family.

TYPE <table.column> IS <TYPE_FAMILY>
attribute value type operators required meaning
IS TYPE_FAMILY none yes expected type family
  • Mode: answered from the catalog.
  • Facts: actual_type, family.
  • Does not accept a WHERE filter.
TYPE orders.id IS integer
TYPE orders.total IS decimal
TYPE events.created_at IS timestamp
does not compile diagnostic
TYPE orders.id FL304
TYPE orders.id IS text FL309
TYPE orders IS integer FL302
TYPE orders.id IS == integer FL306

Data-quality facts

Measured over every row that matches the filter.

ROWS

The table's row count satisfies the stated comparison.

ROWS <table> VALUE ==|!=|<|<=|>|>= <NUMBER> [WHERE <condition>]
attribute value type operators required meaning
VALUE NUMBER == != < <= > >= yes row-count bound
  • Mode: measured with one read-only query.
  • Facts: row_count.
  • Accepts a WHERE filter (always last on the line).
ROWS orders VALUE >=1000
ROWS orders VALUE == 0
ROWS order_items VALUE > 0 WHERE status = 'paid'
does not compile diagnostic
ROWS orders FL304
ROWS orders VALUE 5 FL306
ROWS orders VALUE >= 'many' FL305
ROWS VALUE >= 1 FL301

NULLS

The share of NULL values in the column satisfies the stated comparison.

NULLS <table.column> RATE ==|<=|<|>=|> <RATIO> [WHERE <condition>]
attribute value type operators required meaning
RATE RATIO == <= < >= > yes NULL share
  • Mode: measured with one read-only query.
  • Facts: null_rate.
  • Accepts a WHERE filter (always last on the line).
NULLS orders.email RATE <=5%
NULLS orders.email RATE == 0
NULLS customers.phone RATE < 0.1 WHERE country = 'DE'
does not compile diagnostic
NULLS orders RATE <= 5% FL302
NULLS orders.email FL304
NULLS orders.email RATE != 5% FL306
NULLS orders.email RATE <= 150% FL309

DEAD

Every value of the column is NULL.

DEAD <table.column>
  • Mode: measured with one read-only query.
  • Facts: null_rate.
  • Does not accept a WHERE filter.
DEAD orders.legacy_flag
DEAD shop.orders.legacy_flag
DEAD customers.fax
does not compile diagnostic
DEAD orders FL302
DEAD orders.legacy_flag WHERE status = 'paid' FL308
DEAD orders.legacy_flag RATE 1 FL303

UNIQUE

No (composite) key value is held by more than one row.

UNIQUE <table.column> [WITH <COLUMN_LIST>] [WHERE <condition>]
attribute value type operators required meaning
WITH COLUMN_LIST none no further key columns
  • Mode: measured with one read-only query.
  • Facts: duplicate_keys, max_rows_per_key.
  • Accepts a WHERE filter (always last on the line).
UNIQUE orders.id
UNIQUE order_items.order_id WITH [line_no]
UNIQUE customers.email WHERE status = 'active'
does not compile diagnostic
UNIQUE orders FL302
UNIQUE order_items.order_id WITH [order_id] FL307
UNIQUE orders.id WITH [] FL309
UNIQUE orders.id WITH 3 FL305

FANOUT

The most rows held by any one (composite) key satisfies the stated comparison.

FANOUT <table.column> MAX_PER_KEY <=|<|== <INTEGER> [WITH <COLUMN_LIST>] [WHERE <condition>]
attribute value type operators required meaning
MAX_PER_KEY INTEGER <= < == yes row bound
WITH COLUMN_LIST none no further key columns
  • Mode: measured with one read-only query.
  • Facts: max_rows_per_key.
  • Accepts a WHERE filter (always last on the line).
FANOUT order_items.order_id MAX_PER_KEY <=3
FANOUT order_items.order_id MAX_PER_KEY < 10 WHERE status = 'paid'
FANOUT order_items.order_id MAX_PER_KEY == 1 WITH [product_id]
does not compile diagnostic
FANOUT order_items.order_id FL304
FANOUT order_items.order_id MAX_PER_KEY >= 3 FL306
FANOUT order_items.order_id MAX_PER_KEY <= 2.5 FL309
FANOUT order_items MAX_PER_KEY <= 3 FL302

VALUES

Every non-NULL value of the column is one of the declared values, as text.

VALUES <table.column> IN <VALUE_LIST> [SPLIT <SEPARATOR>] [ALLOW <= <RATIO>] [WHERE <condition>]
attribute value type operators required meaning
IN VALUE_LIST none yes declared values (may be empty)
SPLIT SEPARATOR none no compare only the trimmed prefix before this
ALLOW RATIO <= no tolerated share of undeclared rows
  • Mode: measured with one read-only query.
  • Facts: undeclared_rows, undeclared_distinct, top_undeclared, coverage, undeclared_share.
  • Accepts a WHERE filter (always last on the line).
VALUES orders.status IN ['paid', 'open', 'void']
VALUES orders.reason IN ['other', 'fraud'] SPLIT ':' ALLOW <= 1%
VALUES order_items.quantity IN [1, 2, 3] WHERE status = 'paid'
VALUES orders.status IN []
does not compile diagnostic
VALUES orders.status FL304
VALUES orders.status IN ['paid'] ALLOW >= 1% FL306
VALUES orders.status IN ['paid'] SPLIT 'ab' FL309
VALUES orders IN ['paid'] FL302
VALUES orders.status IN 'paid' FL305

RANGE

The smallest and largest non-NULL values of the column lie within the closed range.

RANGE <table.column> BETWEEN <RANGE_PAIR> [WHERE <condition>]
attribute value type operators required meaning
BETWEEN RANGE_PAIR none yes [low, high], inclusive
  • Mode: measured with one read-only query.
  • Facts: min_value, max_value, in_range.
  • Accepts a WHERE filter (always last on the line).
RANGE order_items.quantity BETWEEN [0, 100]
RANGE products.price BETWEEN [0.01, 9999.99] WHERE active = TRUE
RANGE orders.placed_on BETWEEN [DATE '2020-01-01', DATE '2030-12-31']
does not compile diagnostic
RANGE order_items.quantity FL304
RANGE order_items.quantity BETWEEN [100, 0] FL309
RANGE order_items.quantity BETWEEN 'a' FL305
RANGE order_items.quantity BETWEEN >= [0, 1] FL306
RANGE orders BETWEEN [0, 1] FL302

PATTERN

The share of non-NULL values matching the case-folded LIKE pattern satisfies the comparison.

PATTERN <table.column> LIKE <LIKE_PATTERN> RATE ==|<=|<|>=|> <RATIO> [WHERE <condition>]
attribute value type operators required meaning
LIKE LIKE_PATTERN none yes SQL LIKE pattern (% and _)
RATE RATIO == <= < >= > yes match share
  • Mode: measured with one read-only query.
  • Facts: match_rate.
  • Accepts a WHERE filter (always last on the line).
PATTERN customers.email LIKE '%@%.%' RATE >=99%
PATTERN products.sku LIKE 'SKU-%' RATE == 100% WHERE active = TRUE
PATTERN customers.phone LIKE '+%' RATE < 5%
does not compile diagnostic
PATTERN customers.email LIKE '%@%' FL304
PATTERN customers.email LIKE '%%' RATE >= 99% FL309
PATTERN customers.email LIKE '%@%' RATE != 1 FL306
PATTERN customers.email LIKE 5 RATE >= 99% FL305

FRESH

The newest value of the column is no older than the given duration.

FRESH <table.column> WITHIN <DURATION> [WHERE <condition>]
attribute value type operators required meaning
WITHIN DURATION none yes largest allowed age
  • Mode: measured with one read-only query.
  • Facts: age_seconds, note.
  • Accepts a WHERE filter (always last on the line).
FRESH orders.created_at WITHIN 24h
FRESH events.occurred_at WITHIN 15m WHERE kind = 'checkout'
FRESH opportunities.updated_on WITHIN 2d
does not compile diagnostic
FRESH orders.created_at FL304
FRESH orders.created_at WITHIN 24 FL305
FRESH orders.created_at WITHIN <= 24h FL306
FRESH orders WITHIN 24h FL302

Relationship facts

Measured on both sides of a key.

JOIN

The share of distinct left keys that find a right key satisfies the stated comparison.

JOIN <table.column> -> <table.column> MATCH >=|== <RATIO> [CARD <CARDINALITY>] [CAST <TYPE_FAMILY>] [COVERAGE >=|==|<=|<|> <RATIO>] [WITH <COLUMN_LIST>] [TO <COLUMN_LIST>] [WHERE <condition>]
attribute value type operators required meaning
MATCH RATIO >= == yes forward match rate
CARD CARDINALITY none no declared cardinality (N:1, 1:1, 1:N, N:M)
CAST TYPE_FAMILY none no compare both sides as this type family
COVERAGE RATIO >= == <= < > no share of distinct right keys reached
WITH COLUMN_LIST none no further left key columns
TO COLUMN_LIST none no matching further right key columns
  • Mode: measured with one read-only query.
  • Facts: match_rate, coverage, row_match_rate, fan_in, distinct_left, distinct_right, matched, left_non_null, matched_left_rows, max_left_per_key, max_right_per_key, card_ok.
  • Accepts a WHERE filter (always last on the line).
  • WITH and TO go together and list as many columns.
JOIN order_items.order_id -> orders.id MATCH >=99%
JOIN order_items.order_id -> orders.id MATCH >= 99% CARD N:1 CAST string
JOIN order_items.order_id -> orders.order_id WITH [shop_id] TO [shop_id] MATCH >=99% COVERAGE >= 50%
JOIN orders.customer_id -> customers.id MATCH == 100% COVERAGE < 1% WHERE status = 'paid'
does not compile diagnostic
JOIN order_items.order_id -> orders.id CARD N:1 FL304
JOIN order_items.order_id -> orders.order_id WITH [shop_id] MATCH >=99% FL304
JOIN order_items.order_id -> orders.order_id WITH [shop_id, region] TO [shop_id] MATCH >=99% FL309
JOIN order_items.order_id -> orders.id MATCH <= 99% FL306
JOIN order_items.order_id -> orders.id MATCH >= 99% COVERAGE != 50% FL306
JOIN order_items.order_id MATCH >= 99% FL302

Answer facts

The numbers agents state in answers, with optional tolerance.

COUNT

The number of rows in the table satisfies the stated comparison.

COUNT <table> VALUE ==|!=|<|<=|>|>= <NUMBER> [TOLERANCE <RATIO>] [ABS_TOLERANCE <NUMBER>] [WHERE <condition>]
attribute value type operators required meaning
VALUE NUMBER == != < <= > >= yes the stated answer
TOLERANCE RATIO none no relative band around VALUE (e.g. 1%)
ABS_TOLERANCE NUMBER none no absolute band around VALUE
  • Mode: measured with one read-only query.
  • Facts: value.
  • Accepts a WHERE filter (always last on the line).
  • TOLERANCE and ABS_TOLERANCE are mutually exclusive.
COUNT opportunities VALUE ==1717
COUNT opportunities VALUE == 1717 TOLERANCE 0.5% WHERE stage = 'Churned'
COUNT orders VALUE >= 1000 ABS_TOLERANCE 5
does not compile diagnostic
COUNT opportunities FL304
COUNT VALUE == 1 FL301
COUNT orders VALUE == 1 TOLERANCE 1% ABS_TOLERANCE 2 FL309
COUNT orders VALUE == 1 TOLERANCE >= 1% FL306
COUNT orders VALUE 1 FL306
COUNT orders VALUE == 'many' FL305

DISTINCT

The number of distinct non-NULL values of the column satisfies the stated comparison.

DISTINCT <table.column> VALUE ==|!=|<|<=|>|>= <NUMBER> [TOLERANCE <RATIO>] [ABS_TOLERANCE <NUMBER>] [WHERE <condition>]
attribute value type operators required meaning
VALUE NUMBER == != < <= > >= yes the stated answer
TOLERANCE RATIO none no relative band around VALUE (e.g. 1%)
ABS_TOLERANCE NUMBER none no absolute band around VALUE
  • Mode: measured with one read-only query.
  • Facts: value.
  • Accepts a WHERE filter (always last on the line).
  • TOLERANCE and ABS_TOLERANCE are mutually exclusive.
DISTINCT orders.customer_id VALUE == 42
DISTINCT orders.status VALUE <= 10 WHERE created_at >= DATE '2025-01-01'
DISTINCT customers.country VALUE == 40 TOLERANCE 5%
does not compile diagnostic
DISTINCT orders VALUE == 42 FL302
DISTINCT orders.customer_id FL304
DISTINCT orders.customer_id VALUE == 4 TOLERANCE 1% ABS_TOLERANCE 1 FL309
DISTINCT orders.customer_id VALUE >= 'x' FL305

SUM

The sum of the non-NULL values of the column satisfies the stated comparison.

SUM <table.column> VALUE ==|!=|<|<=|>|>= <NUMBER> [TOLERANCE <RATIO>] [ABS_TOLERANCE <NUMBER>] [WHERE <condition>]
attribute value type operators required meaning
VALUE NUMBER == != < <= > >= yes the stated answer
TOLERANCE RATIO none no relative band around VALUE (e.g. 1%)
ABS_TOLERANCE NUMBER none no absolute band around VALUE
  • Mode: measured with one read-only query.
  • Facts: value.
  • Accepts a WHERE filter (always last on the line).
  • TOLERANCE and ABS_TOLERANCE are mutually exclusive.
SUM order_items.price VALUE == 1234.5
SUM order_items.price VALUE >= 10 TOLERANCE 1% WHERE order_id = 7
SUM order_items.price VALUE == 99.99 ABS_TOLERANCE 0.01
does not compile diagnostic
SUM order_items VALUE == 1 FL302
SUM order_items.price FL304
SUM order_items.price VALUE == 1 TOLERANCE 1% ABS_TOLERANCE 1 FL309
SUM order_items.price VALUE == 'x' FL305
SUM order_items.price VALUE 1 FL306
SUM orders.created_at VALUE >= DATE '2025-01-31' FL305

AVG

The average of the non-NULL values of the column satisfies the stated comparison.

AVG <table.column> VALUE ==|!=|<|<=|>|>= <NUMBER> [TOLERANCE <RATIO>] [ABS_TOLERANCE <NUMBER>] [WHERE <condition>]
attribute value type operators required meaning
VALUE NUMBER == != < <= > >= yes the stated answer
TOLERANCE RATIO none no relative band around VALUE (e.g. 1%)
ABS_TOLERANCE NUMBER none no absolute band around VALUE
  • Mode: measured with one read-only query.
  • Facts: value.
  • Accepts a WHERE filter (always last on the line).
  • TOLERANCE and ABS_TOLERANCE are mutually exclusive.
AVG order_items.price VALUE == 1234.5
AVG order_items.price VALUE >= 10 TOLERANCE 1% WHERE order_id = 7
AVG order_items.price VALUE == 99.99 ABS_TOLERANCE 0.01
does not compile diagnostic
AVG order_items VALUE == 1 FL302
AVG order_items.price FL304
AVG order_items.price VALUE == 1 TOLERANCE 1% ABS_TOLERANCE 1 FL309
AVG order_items.price VALUE == 'x' FL305
AVG order_items.price VALUE 1 FL306
AVG orders.created_at VALUE >= DATE '2025-01-31' FL305

MIN

The smallest non-NULL value of the column satisfies the stated comparison.

MIN <table.column> VALUE ==|!=|<|<=|>|>= <NUMBER_OR_TEMPORAL> [TOLERANCE <RATIO>] [ABS_TOLERANCE <NUMBER>] [WHERE <condition>]
attribute value type operators required meaning
VALUE NUMBER_OR_TEMPORAL == != < <= > >= yes the stated answer
TOLERANCE RATIO none no relative band around VALUE (e.g. 1%)
ABS_TOLERANCE NUMBER none no absolute band around VALUE
  • Mode: measured with one read-only query.
  • Facts: value.
  • Accepts a WHERE filter (always last on the line).
  • TOLERANCE and ABS_TOLERANCE are mutually exclusive.
MIN order_items.price VALUE == 1234.5
MIN order_items.price VALUE >= 10 TOLERANCE 1% WHERE order_id = 7
MIN order_items.price VALUE == 99.99 ABS_TOLERANCE 0.01
MIN orders.created_at VALUE >= DATE '2025-01-31'
MIN events.at VALUE <= TIMESTAMP '2025-01-31T12:00:00Z'
does not compile diagnostic
MIN order_items VALUE == 1 FL302
MIN order_items.price FL304
MIN order_items.price VALUE == 1 TOLERANCE 1% ABS_TOLERANCE 1 FL309
MIN order_items.price VALUE == 'x' FL305
MIN order_items.price VALUE 1 FL306

MAX

The largest non-NULL value of the column satisfies the stated comparison.

MAX <table.column> VALUE ==|!=|<|<=|>|>= <NUMBER_OR_TEMPORAL> [TOLERANCE <RATIO>] [ABS_TOLERANCE <NUMBER>] [WHERE <condition>]
attribute value type operators required meaning
VALUE NUMBER_OR_TEMPORAL == != < <= > >= yes the stated answer
TOLERANCE RATIO none no relative band around VALUE (e.g. 1%)
ABS_TOLERANCE NUMBER none no absolute band around VALUE
  • Mode: measured with one read-only query.
  • Facts: value.
  • Accepts a WHERE filter (always last on the line).
  • TOLERANCE and ABS_TOLERANCE are mutually exclusive.
MAX order_items.price VALUE == 1234.5
MAX order_items.price VALUE >= 10 TOLERANCE 1% WHERE order_id = 7
MAX order_items.price VALUE == 99.99 ABS_TOLERANCE 0.01
MAX orders.created_at VALUE >= DATE '2025-01-31'
MAX events.at VALUE <= TIMESTAMP '2025-01-31T12:00:00Z'
does not compile diagnostic
MAX order_items VALUE == 1 FL302
MAX order_items.price FL304
MAX order_items.price VALUE == 1 TOLERANCE 1% ABS_TOLERANCE 1 FL309
MAX order_items.price VALUE == 'x' FL305
MAX order_items.price VALUE 1 FL306

Semantic facts

Recorded and hashed, never measured.

NOTE

A semantic fact about the column, recorded with its reason and never measured.

NOTE <table.column> IS <SYMBOL> BECAUSE <STRING>
attribute value type operators required meaning
IS SYMBOL none yes the stated semantic (e.g. a unit)
BECAUSE STRING none yes why this holds
  • Mode: unprobeable: semantic fact; recorded, not measured.
  • Does not accept a WHERE filter.
NOTE order_items.price IS eur BECAUSE 'prices are stored in euro'
NOTE orders.total IS 'net of tax' BECAUSE 'finance confirmed'
NOTE events.at IS utc BECAUSE 'the tracker writes UTC'
does not compile diagnostic
NOTE order_items.price IS eur FL304
NOTE order_items.price BECAUSE 'x' FL304
NOTE order_items IS eur BECAUSE 'x' FL302
NOTE order_items.price IS eur BECAUSE 5 FL305
NOTE order_items.price IS eur BECAUSE 'x' WHERE price > 0 FL308