You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error when use function STRING_AGG with IGNORE NULLS
Query sample:
WITH agg_phones AS (
SELECT
m.stone_code,
ct.name AS type,
c.contact_name AS name,
ARRAY_AGG(DISTINCT email IGNORE NULLS) AS email,
ARRAY_AGG(DISTINCT c.mobile_phone_number IGNORE NULLS) AS m_phone,
ARRAY_AGG(DISTINCT c.phone_number IGNORE NULLS) AS phone,
MAX(c.last_modified_date) as last_modified_date
FROM
...
)
SELECT
stone_code,
type,
name,
email,
ARRAY(SELECT DISTINCT phones
FROM
UNNEST(ARRAY_CONCAT(m_phone, phone)) AS phones
) AS phones_array,
last_modified_date,
CURRENT_TIMESTAMP AS processed_at
FROM
agg_phones
How to reproduce?
The text was updated successfully, but these errors were encountered:
Error when use function STRING_AGG with IGNORE NULLS
Query sample:
How to reproduce?
The text was updated successfully, but these errors were encountered: