SELECT Statement

Retrieve rows from one or more ChaosSearch views.

Use the SELECT statement to retrieve rows from one or more ChaosSearch views. The returned data is referred to as the results, or the result set.

Synopsis

[ WITH with_query ]
SELECT [ ALL | DISTINCT ] select_expr [, ...]
[ FROM from_item [, ...] ]
[ WHERE condition ]
[ GROUP BY [ ALL | DISTINCT ] grouping_element [, ...] ]
[ HAVING condition]
[ [ ALL | DISTINCT ] select ]
[ ORDER BY expression [ ASC | DESC ] [, ...] ]
[ { LIMIT [ count | ALL ] } ]

For ChaosSearch SQL queries, the from_item value is the name of a Refinery view:

view_name [ [ AS ] alias [ ( column_alias [, ...] ) ] ]

view1 join_type view2 [ ON join_condition | USING ( join_column [, ...] ) ]

🚧

Limits for DISTINCT and GROUP BY

Both SELECT DISTINCT and GROUP BY have a default limit of 1000 results if a limit is not otherwise specified by the user. During BETA, it is recommended that users specify a limit in queries and use a limit value of 1000 or less.

Example

3394