ADQL Query Syntax

ADQL uses the SELECT statement combined with filtering statements to return sets of data, which can optionally be visualized and added to Custom Dashboards.

ADQL statements are referred to as queries. The query syntax is as follows: 

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]...]

The SELECT clause and FROM clause are required. All other clauses are optional. Type 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"