Skip to main content
NQL includes standard SQL functions plus Narrative-specific functions for data collaboration. Functions are organized by category.

String Functions

Text manipulation: UPPER, LOWER, CONCAT, SUBSTRING, TRIM, and more

Date & Time Functions

Temporal operations: DATE_TRUNC, DATE_ADD, FORMAT_TIMESTAMP, and more

Numeric Functions

Math operations: ROUND, ABS, CEIL, FLOOR, SQRT, and more

Aggregate Functions

GROUP BY computations: COUNT, SUM, AVG, MIN, MAX, and more

Array & Map Functions

Collection operations: FILTER, TRANSFORM, SIZE, ELEMENT_AT, and more

Window Functions

Ranking and analytics: ROW_NUMBER, RANK, LAG, LEAD, and more

Geospatial Functions

Geographic calculations: ST_GeoHash, ST_Distance, and more

Narrative Functions

Platform-specific: DELTA, budget functions, and more

AI & ML Functions

LLM inference and custom models: AI_COMPLETE, CALL_MODEL_FUNCTION

Conditional Functions

Conditional logic: IF, COALESCE, NULLIF, CASE

Data Types

Types accepted and returned by functions

Operators

Comparison, logical, and arithmetic operators

Common Query Patterns

Real-world examples using these functions