MAPREDUCE服务 MRS-UNION | INTERSECT | EXCEPT:EXCEPT

时间:2024-11-06 14:23:39

EXCEPT

query EXCEPT [DISTINCT] query

EXCEPT返回在第一个查询结果而不在第二个查询结果中的行。

SELECT * FROM (VALUES 13, 42) EXCEPT SELECT 13;
 _col0
-------
   42
(1 row)

Having子句目前不支持使用列的别名,例如:

select count(userid) as num ,dept as aaa from salary group by dept having aaa='d1';

报错如下:

Query 20210630_085136_00024_wc8n9@default@HetuEngine failed: line 1:75: Column 'aaa' cannot be resolved

support.huaweicloud.com/cmpntguide-lts-mrs/mrs_01_300181.html