The table below contains a complete Search Ads 360 Query Language grammar reference.
Grammar reference | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Query |
|
||||||||||||
Field name | [a-z] ([a-zA-Z0-9._])* |
||||||||||||
Resource name | [a-z] ([a-zA-Z_])* |
||||||||||||
Condition | FIELD_NAME OPERATOR VALUE |
||||||||||||
Ordering | FIELD_NAME (ASC | DESC)? |
||||||||||||
Operator | = | != | > | >= | < | <= | IN | NOT IN | LIKE | NOT LIKE | CONTAINS ANY | |
||||||||||||
Function | LAST_14_DAYS | LAST_30_DAYS | LAST_7_DAYS | LAST_BUSINESS_WEEK | LAST_MONTH | |
||||||||||||
Value | LITERAL | LITERAL_LIST | NUMBER | NUMBER_LIST | STRING | STRING_LIST | FUNCTION |
||||||||||||
Positive integer | [1-9] ([0-9])* |
||||||||||||
Number | -? [0-9]+ (. [0-9] [0-9]*)? |
||||||||||||
String | (' Char* ') | (" Char* ") |
||||||||||||
Literal | [a-zA-Z0-9_]* |
||||||||||||
String list | ( STRING (, STRING)* ) |
||||||||||||
Literal list | ( LITERAL (, LITERAL)* ) |
||||||||||||
Number list | ( NUMBER (, NUMBER)* ) |
Key:
?
indicates an optional element.*
means zero or more+
means one or more.(xxxxxx)
indicates a grouping.[a-z0-9]
indicates a character range.Char
indicates any character.|
stands for "or".- The
REGEXP_MATCH
operator uses RE2 syntax. To match a
[
,]
,%
, or_
literal using theLIKE
operator, surround the character in square brackets. For example, the following condition matches allcampaign.name
values that start with[Earth_to_Mars]
:WHERE campaign.name LIKE '[[]Earth[_]to[_]Mars[]]%'