数据仓库服务 GAUSSDB(DWS)-Roaring Bitmap聚合函数:rb_and_cardinality_agg(roaringbitmap)

时间:2024-10-21 16:50:41

rb_and_cardinality_agg(roaringbitmap)

描述:分组内的roaringbitmap按照交集计算后的基数。

返回值类型:int

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
SELECT a, rb_and_cardinality_agg(b) FROM r1 GROUP BY a ORDER BY 1;
 a  | rb_and_cardinality_agg
----+------------------------
 1  |                      1
 2  |                      1
 3  |                      1
 4  |                      1
 5  |                      1
 6  |                      1
 7  |                      1
 8  |                      1
 9  |                      1
 10 |                      1
(10 rows)
support.huaweicloud.com/sqlreference-830-dws/dws_06_0324.html