This page describes ADQL query syntax. ADQL uses the SELECT statement and filtering statements, otherwise referred to as queries, to return sets of data that you can add to Custom Dashboards.
ADQL search queries have a 5,000 character limit and reserve keywords in certain field names or milestones.
Reserved ADQL Keywords |
---|
SELECT |
FROM |
WHERE |
ORDERBY |
AND |
OR |
EXISTS |
NOT |
LIKE |
REGEX |
COMPARE |
LIST |
IN |
BETWEEN |
COUNT |
DISTINCT |
MIN |
MAX |
STATS |
SUM |
AVG |
STDEV |
FILTER |
PERCENTILE |
RANGE |
SERIES |
SUBSTRING |
INDEXOF |
LENGTH |
TRIM |
CONCAT |
NOW |
The query syntax is:
SELECT * | {[DISTINCT] expression [AS alias] [, expression [AS alias]]...}
FROM event_type
[WHERE condition_expression]
[SINCE timevalue [UNTIL timevalue]]
[HAVING condition_expression]
[ORDER BY {field_name | alias} [ASC | DESC] [, {field_name | alias} [ASC | DESC]]...]
[LIMIT integer [, integer]...]
CODE
While the SELECT and FROM clauses are required, all other clauses are optional. Enter spaces around each keyword.
For GROUP BY functionality, see GROUP BY.
Search with Partial Text Strings
To prevent tokenization of messages and text-type strings, prefixes must be added to wildcards when you search with partial text strings.
The following ADQL query uses a partial text string to search for the word example
:
SELECT * FROM logs WHERE message = "*xample"
CODE