Skip to main content
Reserved keywords have special meaning in NQL and cannot be used as unquoted identifiers (table names, column names, aliases). To use a reserved keyword as an identifier, enclose it in double quotes.

Using reserved keywords as identifiers

-- This fails: "type" is a reserved keyword
SELECT type FROM company_data."123"

-- This works: quoted identifier
SELECT "type" FROM company_data."123"

-- Column alias using reserved keyword
SELECT category AS "group" FROM company_data."123"

Reserved keywords list

The following keywords are reserved in NQL:

A-C

KeywordCategory
ALLClause
ANDOperator
ANYClause
ARRAYType
ASClause
ASCClause
BETWEENOperator
BIGINTType
BOOLEANType
BUDGETNarrative
BYClause
CALENDAR_DAYNarrative
CALENDAR_MONTHNarrative
CASEExpression
CASTFunction
CREATEStatement
CROSSJoin
CURRENT_DATEFunction
CURRENT_TIMESTAMPFunction

D-G

KeywordCategory
DATEType
DAYInterval
DECIMALType
DELETEStatement
DELTANarrative
DESCClause
DESCRIPTIONNarrative
DISPLAY_NAMENarrative
DISTINCTClause
DOUBLEType
ELSEExpression
ENDExpression
EXISTSOperator
EXPLAINStatement
EXPIRENarrative
EXTENDED_STATSNarrative
FALSELiteral
FROMClause
FULLJoin
GROUPClause

H-L

KeywordCategory
HAVINGClause
HOURInterval
IFFunction
INOperator
INNERJoin
INSERTStatement
INTType
INTEGERType
INTERVALType
INTOClause
ISOperator
JOINJoin
LATERALJoin
LEFTJoin
LIKEOperator
LIMITClause
LONGType

M-O

KeywordCategory
MAPType
MATCHEDMerge
MATERIALIZEDStatement
MERGEStatement
MINUTEInterval
MONTHInterval
NOTOperator
NULLLiteral
OFFSETClause
ONClause
OROperator
ORDERClause
OUTERJoin
OVERWindow

P-R

KeywordCategory
PARTITIONWindow
PARTITIONED_BYNarrative
PERNarrative
QUALIFYClause
REFRESH_SCHEDULENarrative
RIGHTJoin
ROWSClause

S-T

KeywordCategory
SECONDInterval
SELECTStatement
SETStatement
SOURCEMerge
STATUSNarrative
STRINGType
STRUCTType
TABLEStatement
TAGSNarrative
TARGETMerge
THENExpression
TIMESTAMPType
TRUELiteral

U-Z

KeywordCategory
UNIONClause
UNNESTFunction
UPDATEStatement
USDNarrative
VALUESClause
VARCHARType
VIEWStatement
WHENExpression
WHEREClause
WITHClause
WITHINClause
WRITE_MODENarrative
YEARInterval

Categories

CategoryDescription
ClauseSQL clause keywords
ExpressionCASE/conditional expression keywords
FunctionBuilt-in function names
IntervalDate/time interval units
JoinJOIN clause keywords
LiteralLiteral value keywords
MergeMERGE statement keywords
NarrativeNarrative-specific extensions
OperatorComparison and logical operators
StatementStatement type keywords
TypeData type keywords
WindowWindow function keywords

Best practices

Always quote dataset IDs

Dataset IDs are numeric and must be quoted:
-- Correct
FROM company_data."123"

-- Incorrect
FROM company_data.123

Quote ambiguous column names

When column names might conflict with keywords:
SELECT
  "type",
  "group",
  "order",
  "value"
FROM company_data."123"

Use aliases for clarity

Assign clear aliases to avoid quoting in subsequent references:
SELECT
  "type" AS identifier_type,
  "group" AS category_group
FROM company_data."123"
WHERE identifier_type = 'email'