SELECT - Amazon Timestream

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

SELECT

SELECTpernyataan dapat digunakan untuk mengambil data dari satu atau lebih tabel. Bahasa query Timestream mendukung sintaks berikut untuk SELECTpernyataan:

[ WITH with_query [, ...] ] SELECT [ ALL | DISTINCT ] select_expr [, ...] [ function (expression) OVER ( [ PARTITION BY partition_expr_list ] [ ORDER BY order_list ] [ frame_clause ] ) [ FROM from_item [, ...] ] [ WHERE condition ] [ GROUP BY [ ALL | DISTINCT ] grouping_element [, ...] ] [ HAVING condition] [ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] select ] [ ORDER BY order_list ] [ LIMIT [ count | ALL ] ]

di mana

  • function (expression)adalah salah satu fungsi jendela yang didukung.

  • partition_expr_listadalah:

    expression | column_name [, expr_list ]
  • order_listadalah:

    expression | column_name [ ASC | DESC ] [ NULLS FIRST | NULLS LAST ] [, order_list ]
  • frame_clauseadalah:

    ROWS | RANGE { UNBOUNDED PRECEDING | expression PRECEDING | CURRENT ROW } | {BETWEEN { UNBOUNDED PRECEDING | expression { PRECEDING | FOLLOWING } | CURRENT ROW} AND { UNBOUNDED FOLLOWING | expression { PRECEDING | FOLLOWING } | CURRENT ROW }}
  • from_itemadalah salah satu dari:

    table_name [ [ AS ] alias [ ( column_alias [, ...] ) ] ] from_item join_type from_item [ ON join_condition | USING ( join_column [, ...] ) ]
  • join_typeadalah salah satu dari:

    [ INNER ] JOIN LEFT [ OUTER ] JOIN RIGHT [ OUTER ] JOIN FULL [ OUTER ] JOIN
  • grouping_elementadalah salah satu dari:

    () expression