SQL expressions in Amazon IoT Analytics - Amazon IoT Analytics
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).

Amazon IoT Analytics is no longer available to new customers. Existing customers of Amazon IoT Analytics can continue to use the service as normal. Learn more

SQL expressions in Amazon IoT Analytics

Datasets are generated using SQL expressions on data in a data store. Amazon IoT Analytics uses the same SQL queries, functions and operators as Amazon Athena.

Amazon IoT Analytics supports a subset of ANSI standard SQL syntax.

SELECT [ ALL | DISTINCT ] select_expression [, ...] [ FROM from_item [, ...] ] [[ INNER | OUTER ] LEFT | RIGHT | FULL | CROSS JOIN join_item [ ON join_condition ]] [ WHERE condition ] [ GROUP BY [ ALL | DISTINCT ] grouping_element [, ...] ] [ HAVING condition ] [ UNION [ ALL | DISTINCT ] union_query ] [ ORDER BY expression [ ASC | DESC ] [ NULLS FIRST | NULLS LAST] [, ...] ] [ LIMIT [ count | ALL ] ]

For a description of the parameters, see Parameters in the Amazon Athena documentation.

Amazon IoT Analytics and Amazon Athena doesn't support the following:

  • WITH clauses.

  • CREATE TABLE AS SELECT statements

  • INSERT INTO statements

  • Prepared statements, you can't run EXECUTE with USING.

  • CREATE TABLE LIKE

  • DESCRIBE INPUT and DESCRIBE OUTPUT

  • EXPLAIN statements

  • User-defined functions (UDFs or UDAFs)

  • Stored procedures

  • Federated connectors