Retrieve data with a SELECT statement - Amazon IoT SiteWise
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Retrieve data with a SELECT statement

The SELECT statement is used to retrieve data from one or more views. Amazon IoT SiteWise supports an implicit JOIN of the views. You can list the views to join (in the FROM clause of the SELECT statement), using commas to separate them.

Use the following SELECT statement:

SELECT select_expr [, ...] [ FROM from_item [, ...] ] [ WHERE [LIKE condition ESCAPE condition] ]

In the previous example, the LIKE clause specifies the search and filtering conditions using wild cards. Amazon IoT SiteWise supports percentage (%) as the wild card character.

Example to use % in a condition:
Prefix search: String% Infix search: %String% Suffix search: %String
Example to search for an asset:
SELECT asset_name, asset_description FROM asset WHERE asset_name LIKE 'Wind%'
Example to search for an asset using an ESCAPE condition:
SELECT asset_name, asset_description FROM asset WHERE asset_name LIKE 'room\%' ESCAPE '\'