MAPREDUCE服务 MRS-SELECT:语法

时间:2024-11-28 20:08:11

语法

[/*+ query_rewrite_hint*/]

[ WITH [ RECURSIVE ] with_query [, ...] ]

SELECT [ ALL | DISTINCT ] select_expression [, ...]

[ FROM from_item [, ...] ]

[ WHERE condition ]

[ GROUP BY [ ALL | DISTINCT ] grouping_element [, ...] ]

[ HAVING condition]

[ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] select ]

[ ORDER BY expression [ ASC | DESC ] [, ...] ]

[ OFFSET count [ ROW | ROWS ] ]

[ LIMIT { count | ALL } ]

[ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } { ONLY | WITH TIES } ]

  • from_item可以是以下形式:
    • table_name [ [ AS ] alias [ ( column_alias [, ...] ) ] ]
    • from_item join_type from_item [ ON join_condition | USING ( join_column [, ...] ) ]
    • table_name [ [ AS ] alias [ ( column_alias [, ...] ) ] ]

      MATCH_RECOGNIZE pattern_recognition_specification

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

  • join_type可以是以下形式:
    • [ INNER ] JOIN
    • LEFT [ OUTER ] JOIN
    • RIGHT [ OUTER ] JOIN
    • FULL [ OUTER ] JOIN
    • LEFT [SEMI] JOIN
    • RIGHT [SEMI] JOIN
    • LEFT [ANTI] JOIN
    • RIGHT [ANTI] JOIN
    • CROSS JOIN
  • grouping_element可以是以下形式:
    • ()
    • expression
    • GROUPING SETS ( ( column [, ...] ) [, ...] )
    • CUBE ( column [, ...] )
    • ROLLUP ( column [, ...] )
support.huaweicloud.com/cmpntguide-lts-mrs/mrs_01_300177.html