Skip to main content
NQL (Narrative Query Language) uses SQL-like syntax with extensions for data collaboration. This page provides a high-level overview of statement types and links to detailed references.

Statement types

NQL supports three main statement types:
StatementPurposeReference
SELECTExecute a query and return resultsSELECT
EXPLAINForecast data availability and cost without executingEXPLAIN
CREATE MATERIALIZED VIEWCreate a stored dataset from a queryCREATE 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 * or COUNT(*). 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").