Example queries - 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).

Example queries

Metadata filtering

The following example is for metadata filtering with a SELECT statement with the Amazon IoT SiteWise query language:

SELECT a.asset_name, p.property_name FROM asset a, asset_property p WHERE a.asset_id = p.asset_id AND a.asset_name LIKE '%windmill%'

Value filtering

The following is an example of value filtering using a SELECT statement with the Amazon IoT SiteWise query language:

SELECT a.asset_name FROM asset a, raw_time_series r WHERE a.asset_id = r.asset_id AND r.int_value > 30 AND r.event_timestamp > 1234567890 AND r.event_timestamp < 1234567891