fixed query for organisations' pids

This commit is contained in:
Alessia Bardi 2021-04-29 12:18:42 +02:00 committed by Claudio Atzori
parent f6ccd54d87
commit 9a20057615
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ SELECT
o.country || '@@@dnet:countries' AS country, o.country || '@@@dnet:countries' AS country,
array[]::text[] AS alternativenames, array[]::text[] AS alternativenames,
'sysimport:crosswalk:entityregistry@@@dnet:provenance_actions' AS provenanceaction, 'sysimport:crosswalk:entityregistry@@@dnet:provenance_actions' AS provenanceaction,
array_agg(DISTINCT i.pid || '###' || i.issuertype || '@@@dnet:pid_types') AS pid array_remove(array_agg(DISTINCT i.pid || '###' || i.issuertype || '@@@' || i.issuertype), NULL) AS pid
FROM dsm_organizations o FROM dsm_organizations o
LEFT OUTER JOIN dsm_datasources d ON (d.id = o.collectedfrom) LEFT OUTER JOIN dsm_datasources d ON (d.id = o.collectedfrom)
LEFT OUTER JOIN dsm_organizationpids p ON (p.organization = o.id) LEFT OUTER JOIN dsm_organizationpids p ON (p.organization = o.id)
@ -51,4 +51,4 @@ GROUP BY
o.trust, o.trust,
d.id, d.id,
d.officialname, d.officialname,
o.country; o.country