Skip to content

16.1 SQL Reference

Precise definitions of SQL syntax, functions, data types, query hints, and relative time expressions.

Subsections

SectionDescription
SQL Syntax DictionaryBNF syntax and examples for CREATE, DROP, ALTER, SELECT, WITH/CTE, INSERT, DELETE, UPDATE, BACKUP, MOUNT, and other statements
Function DictionaryAggregate, mathematical, string, date/time, type conversion, and TAG-specific functions
Data Type DictionarySizes, ranges, defaults, and availability by table type
SELECT Hint SyntaxSELECT hint syntax, usage, and applicable targets
Relative Time ExpressionsRelative time literals such as now - 1h and their suffixes
ROWIDROWID meaning, predicates, and INSERT results by table type

SQL Features

Based on ANSI SQL, with extensions optimized for time-series processing.

  • TAG time-series features: BASETIME, METADATA, FIRST/LAST, SERIES BY, ROLLUP
  • Time-range queries: DURATION, BEFORE, AFTER, and RANGE clauses
  • Common table expressions: Nonrecursive WITH/CTE in Standard Edition
  • Bulk ingestion integration: Client SDK Append APIs (separate ingestion APIs, not SQL statements)
  • Text search: SEARCH, ESEARCH, and REGEXP operators
  • Set operations: UNION ALL (UNION, INTERSECT, and EXCEPT are not supported)
Last updated on