# oa_duplicates_view

0 rows

### Columns

Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments
--- | --- | --- | --- | --- | --- | --- | --- | ---

local_id

text

2147483647

√

null

oa_original_id

text

2147483647

√

null

oa_name

text

2147483647

√

null

oa_acronym

text

2147483647

√

null

oa_country

text

2147483647

√

null

oa_url

text

2147483647

√

null

oa_other_ids

jsonb

2147483647

√

null

oa_collectedfrom

text

2147483647

√

null

reltype

text

2147483647

√

null

created_by

text

2147483647

√

null

ec_legalbody

bool

1

√

null

ec_legalperson

bool

1

√

null

ec_nonprofit

bool

1

√

null

ec_researchorganization

bool

1

√

null

ec_highereducation

bool

1

√

null

ec_internationalorganizationeurinterests

bool

1

√

null

ec_internationalorganization

bool

1

√

null

ec_enterprise

bool

1

√

null

ec_smevalidated

bool

1

√

null

ec_nutscode

bool

1

√

null

### View Definition

SELECT d.local_id, d.oa_original_id, o.name AS oa_name, array_to_string(array_agg(DISTINCT a.acronym), ', '::text) AS oa_acronym, o.country AS oa_country, array_to_string(array_agg(DISTINCT u.url), ', '::text) AS oa_url, COALESCE(jsonb_agg(DISTINCT jsonb_build_object('id', oid.otherid, 'type', oid.type)) FILTER (WHERE (oid.otherid IS NOT NULL)), '[]'::jsonb) AS oa_other_ids, d.oa_collectedfrom, d.reltype, d.created_by, o.ec_legalbody, o.ec_legalperson, o.ec_nonprofit, o.ec_researchorganization, o.ec_highereducation, o.ec_internationalorganizationeurinterests, o.ec_internationalorganization, o.ec_enterprise, o.ec_smevalidated, o.ec_nutscode FROM ((((oa_duplicates d LEFT JOIN organizations o ON ((o.id = d.oa_original_id))) LEFT JOIN acronyms a ON ((o.id = a.id))) LEFT JOIN urls u ON ((o.id = u.id))) LEFT JOIN other_ids oid ON ((o.id = oid.id))) GROUP BY d.local_id, d.oa_original_id, d.created_by, o.name, o.country, d.oa_collectedfrom, d.reltype, o.ec_legalbody, o.ec_legalperson, o.ec_nonprofit, o.ec_researchorganization, o.ec_highereducation, o.ec_internationalorganizationeurinterests, o.ec_internationalorganization, o.ec_enterprise, o.ec_smevalidated, o.ec_nutscode;

### Possibly Referenced Tables/Views

- oa_duplicates
- organizations
- acronyms
- urls
- other_ids