Once you have selected to edit or build a new stat, the stat builder gives you both a guided process, as well as raw DPQL.
DPQL queries consists of a series of clauses:
SELECT select expression
FROM database table
[SPLIT BY split fields]
[GROUP BY group fields]
[ORDER BY order fields]
[LIMIT amount [OFFSET offset amount]
[LAYER WITH another query]
[UNION another subquery]
Clauses in [square brackets] are optional.
Italic text is a placeholder for a value that you enter.**