DQL操作

更新时间:
复制 MD 格式

MaxCompute中的DQL语句包括SELECT、JOIN、WHERE子句等。本文为您介绍Dataphin支持的MaxCompute的DQL操作语句。

功能

是否支持

命令格式

是

列表达式(select_expr)

  • 支持*

  • 支持distinct

  • 不支持正则表达式

WHERE子句(where_condition)

Dataphin 2.9.2及之后版本支持UDF分区裁剪

当SQL语句设置了group by属性,即set odps.sql.groupby.position.alias=true;,group by中的整型常量会被当做select的列序号处理,详情请参见GROUP BY分组查询(col_list)

是

基础子查询

  • 支持select <select_expr> from (<select_statement>) <sq_alias_name>;

  • 不支持select (<select_statement>) from <table_name>;

IN SUBQUERY

是

NOT EXISTS SUBQUERY

是

SCALAR SUBQUERY

是

交集、并集和补集

  • 支持intersect

  • 不支持intersect all

  • 不支持intersect distinct

并集

  • 支持union all

  • 支持union [distinct]

补集

  • 支持except

  • 支持except all

  • 支持minus

  • 不支持except distinct

  • 不支持minus distinct

  • 不支持minus distinct

JOIN

是

SEMI JOIN(半连接)

是

MAPJOIN HINT

是

Lateral View

是

GROUPING SETS

是

COMMON TABLE EXPRESSION(CTE)

是

CLONE TABLE

否

SELECT TRANSFORM

否

EXPLAIN

否

SELECT语序

否

GROUPING SETS

是

TABLESAMPLE采样

是

QUALIFY

是

PIVOT、UNPIVOT

是