Statement types
NQL supports three main statement types:| Statement | Purpose | Reference |
|---|---|---|
SELECT | Execute a query and return results | SELECT |
EXPLAIN | Forecast data availability and cost without executing | EXPLAIN |
CREATE MATERIALIZED VIEW | Create a stored dataset from a query | CREATE MATERIALIZED VIEW |
Query Templates
NQL also supports parameterized queries through query templates, which use placeholder syntax to create reusable, customizable queries.Key syntax rules
- Explicit columns required: NQL does not support
SELECT *orCOUNT(*). See Explicit Column Selection. - Reserved keywords: Certain keywords must be quoted when used as identifiers. See Reserved Keywords.
- Fully qualified names: Use fully qualified column names (e.g.,
company_data."123".column_name) to avoid ambiguity, especially in joins. - Dataset IDs must be quoted: Dataset IDs are numeric and must be enclosed in double quotes (e.g.,
company_data."123").

