查詢文法參考資料
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
下表包含完整的 Search Ads 360 查詢語言文法參考資料。
文法參考資料 |
查詢 |
SELECT 子句 |
SELECT FIELD_NAME (, FIELD_NAME)* |
FROM 子句 |
FROM RESOURCE_NAME |
WHERE 子句 |
WHERE CONDITION (AND CONDITION)* |
ORDER BY 子句 |
ORDER BY ORDERING (, ORDERING)* |
LIMIT 子句 |
LIMIT POSITIVE_INTEGER |
PARAMETERS 子句 |
PARAMETERS LITERAL = VALUE (, LITERAL = VALUE)* |
|
欄位名稱 |
[a-z] ([a-zA-Z0-9._])* |
資源名稱 |
[a-z] ([a-zA-Z_])* |
條件 |
FIELD_NAME OPERATOR VALUE |
排序 |
FIELD_NAME (ASC | DESC)? |
運算子 |
= | != | > | >= | < | <= | IN | NOT IN | LIKE | NOT LIKE | CONTAINS ANY | CONTAINS ALL | CONTAINS NONE | IS NULL | IS NOT NULL | DURING | BETWEEN | REGEXP_MATCH | NOT REGEXP_MATCH |
函式 |
LAST_14_DAYS | LAST_30_DAYS | LAST_7_DAYS | LAST_BUSINESS_WEEK | LAST_MONTH | LAST_WEEK_MON_SUN | LAST_WEEK_SUN_SAT | THIS_MONTH | THIS_WEEK_MON_TODAY | THIS_WEEK_SUN_TODAY | TODAY | YESTERDAY |
值 |
LITERAL | LITERAL_LIST | NUMBER | NUMBER_LIST | STRING | STRING_LIST | FUNCTION |
正整數 |
[1-9] ([0-9])* |
數字 |
-? [0-9]+ (. [0-9] [0-9]*)? |
字串 |
(' Char* ') | (" Char* ") |
文字 |
[a-zA-Z0-9_]* |
字串清單 |
( STRING (, STRING)* ) |
文字清單 |
( LITERAL (, LITERAL)* ) |
數字清單 |
( NUMBER (, NUMBER)* ) |
索引鍵:
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-29 (世界標準時間)。
[null,null,["上次更新時間:2025-08-29 (世界標準時間)。"],[[["\u003cp\u003eThis document provides a comprehensive grammar reference for the Search Ads 360 Query Language.\u003c/p\u003e\n"],["\u003cp\u003eThe language allows users to query data using a structured syntax including clauses like \u003ccode\u003eSELECT\u003c/code\u003e, \u003ccode\u003eFROM\u003c/code\u003e, \u003ccode\u003eWHERE\u003c/code\u003e, \u003ccode\u003eORDER BY\u003c/code\u003e, \u003ccode\u003eLIMIT\u003c/code\u003e, and \u003ccode\u003ePARAMETERS\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eVarious data types like numbers, strings, and lists are supported within the query structure for filtering and data retrieval.\u003c/p\u003e\n"],["\u003cp\u003eSpecific operators and functions enable detailed data manipulation, such as date ranges (\u003ccode\u003eLAST_30_DAYS\u003c/code\u003e) and pattern matching (\u003ccode\u003eREGEXP_MATCH\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe provided table details the syntax and components of the query language, along with explanations of special characters and usage examples.\u003c/p\u003e\n"]]],["The Search Ads 360 Query Language grammar includes clauses like `SELECT`, `FROM`, `WHERE`, `ORDER BY`, `LIMIT`, and `PARAMETERS`. It defines field, resource, and operator types, allowing queries to select data, specify the source, filter results, order them, and limit the output. Conditions are built with `FIELD_NAME`, `OPERATOR`, and `VALUE`. Values can be literals, numbers, strings, or lists. The grammar includes operators like `=`, `!=`, `\u003e`, `IN`, `LIKE`, and `REGEXP_MATCH` for comparisons.\n"],null,[]]