我面临一个问题,在这个问题中,ARRAY_AGG是用“忽略null”传递的,但是输出中仍然包含空值。有人能告诉我我做错了什么吗?event_datedefect_nesting as ( batch_id, product_part_id,
array_aggORDER BY product_part_id) productInfo
我有一个包含6个可能电话号码的示例,我需要创建一个数组或json,其中包含所有的电话号码,不包括副本和NULL。我的样本是这样的:SELECT 619883407 as phone_1,CAST(null ASINT64) as phone_3,69883407 as phone_5,SELECT ARRAY_AGG</em
我试图从PostgreSQL函数上的两个带左联接的表中构建一个自定义json,但它不能工作。表结构: id | title | description id | postId (FK) | name {$BODY$DECLARE msg text;BEGIN
SELECT to_json(array_agg(t))
我有一个整数类型的列,名为start。我想根据这一列的值创建一个数组。这看起来很简单,我使用了array_agg(),但它给出了空数组作为输出。以下是我的列数据 1 11 . .(and so on)select array_agg(start) as start_array from table1;
为什么它会给出空数组?