Skip to main content
NQL (Narrative Query Language) is a SQL-like language with extensions for data collaboration. This reference covers all syntax, types, functions, and operators supported by NQL.
Looking to learn NQL? Start with NQL Design Philosophy for concepts or Write Your First NQL Query for a hands-on tutorial.

SQL Commands

Write and execute queries, forecast costs, and create stored datasets.

SELECT

Retrieve data from datasets

EXPLAIN

Forecast cost and availability

CREATE MATERIALIZED VIEW

Create stored datasets from queries

Query Templates

Parameterized queries with placeholder syntax

Data Types

Data Types

Primitive types, complex types, type casting, and NULL handling

Operators

Operators

Comparison, logical, arithmetic, string, and pattern matching operators

Functions

Built-in and Narrative-specific functions organized by category.

String

Text manipulation

Date & Time

Temporal operations

Numeric

Math and rounding

Aggregate

GROUP BY computations

Array & Map

Collection operations

Window

Ranking and analytics

Geospatial

Geographic calculations

Narrative

Platform-specific functions

Conditional

IF, COALESCE, NULLIF

General Reference

Syntax Overview

Statement types and grammar

Explicit Columns

Why wildcards are not supported

Reserved Keywords

Keywords requiring quoting