[stats wf] indicators across stats dbs & updates in the org ids #248

Closed
dimitris.pierrakos wants to merge 1742 commits from beta into beta2master_sept_2022
1 changed files with 1 additions and 1 deletions
Showing only changes of commit b76a47b103 - Show all commits

View File

@ -18,7 +18,7 @@ SELECT
ARRAY(SELECT DISTINCT pid FROM unnest(array_cat( ARRAY(SELECT DISTINCT pid FROM unnest(array_cat(
array_agg(DISTINCT i.otherid || '###' || i.type || '@@@dnet:pid_types'), array_agg(DISTINCT i.otherid || '###' || i.type || '@@@dnet:pid_types'),
array_agg(DISTINCT idup.otherid || '###' || idup.type || '@@@dnet:pid_types') array_agg(DISTINCT idup.otherid || '###' || idup.type || '@@@dnet:pid_types')
)) as t(pid) where pid IS NOT NULL), )) as t(pid) where pid IS NOT NULL) AS pid,
(array_remove(array_cat(ARRAY[o.ec_legalbody], array_agg(od.ec_legalbody)), NULL))[1] AS eclegalbody, (array_remove(array_cat(ARRAY[o.ec_legalbody], array_agg(od.ec_legalbody)), NULL))[1] AS eclegalbody,
(array_remove(array_cat(ARRAY[o.ec_legalperson], array_agg(od.ec_legalperson)), NULL))[1] AS eclegalperson, (array_remove(array_cat(ARRAY[o.ec_legalperson], array_agg(od.ec_legalperson)), NULL))[1] AS eclegalperson,
(array_remove(array_cat(ARRAY[o.ec_nonprofit], array_agg(od.ec_nonprofit)), NULL))[1] AS ecnonprofit, (array_remove(array_cat(ARRAY[o.ec_nonprofit], array_agg(od.ec_nonprofit)), NULL))[1] AS ecnonprofit,