Skip to content

A RepzoQL query is a few lines of text, one clause per line. It starts with FROM and the object to report on; the other clauses can come in any order, and each is used once.

FROM deals
SHOW count, won_value
GROUP BY owner
WHERE stage != "Lost"
DURING this_quarter
COMPARE TO previous_quarter
ORDER BY won_value DESC
LIMIT 10
VISUALIZE won_value TYPE horizontal_bar
Clause What it does Reference
FROM The object to report on FROM and SHOW
SHOW The numbers to show FROM and SHOW
WHERE Only count matching records WHERE
GROUP BY Split the numbers by fields GROUP BY
TIMESERIES Split by time, with no gaps TIMESERIES
SINCE, UNTIL, DURING, ON The period and the date it uses SINCE, UNTIL, DURING
COMPARE TO A second period to compare with COMPARE TO
WITH Totals, percent change, running totals, currency, time zone WITH
HAVING Keep only groups whose numbers match HAVING
ORDER BY, LIMIT, OFFSET Sort and page the rows ORDER BY and LIMIT
COHORT Follow people from their first record COHORT
VISUALIZE Pick the chart VISUALIZE

Objects, metrics, and fields are written by name. Names come from each object’s catalog and from Properties, so custom properties work too.

  • A field is written as its name: stage, owner, close_date.
  • A custom property can be written as its label in snake case (customer_tier) or in double quotes ("Customer tier").
  • A related object’s metric or field takes the object name and a dot: deals.won_value, accounts.industry. See Related records.

The Objects page lists every object. The editor’s book icon lists each object’s metrics and fields.

Kind Examples
Text and options "Won", "Website", "Sam Seller" (always in double quotes)
Numbers 1000, 12.5
Dates 2026-01-31, -30d, startOfMonth(-1m), last_month
Yes / no IS TRUE, IS FALSE
The viewer me, as in owner = me

Option values use the option’s name. A stage name used by several pipelines matches all of them; write "Won (Sales)" to pick one.

Keywords can be upper or lower case. Line comments start with --; block comments go between /* and */.

FROM deals -- every deal
/* won value by owner,
this quarter only */
SHOW won_value
GROUP BY owner
DURING this_quarter

The editor checks the query as you type. A mistake is underlined, the card shows the line and a short explanation, and close matches are offered as fixes: “Did you mean count?”. The same message, with its line and column, comes back from the API.