using organization ids instead of names in monitor db creation #121

Merged
claudio.atzori merged 1 commits from :stable_ids into stable_ids 2021-07-05 11:07:39 +02:00
1 changed files with 6 additions and 6 deletions
Showing only changes of commit 89e6f46682 - Show all commits

View File

@ -17,11 +17,11 @@ create table TARGET.result as
union all union all
select * from SOURCE.result r where exists (select 1 from SOURCE.result_concepts rc where rc.id=r.id) select * from SOURCE.result r where exists (select 1 from SOURCE.result_concepts rc where rc.id=r.id)
union all union all
select * from SOURCE.result r where exists (select 1 from SOURCE.result_projects rp join SOURCE.project p on p.id=rp.project join SOURCE.project_organizations po on po.id=p.id join SOURCE.organization o on o.id=po.organization where rp.id=r.id and o.name in ( select * from SOURCE.result r where exists (select 1 from SOURCE.result_projects rp join SOURCE.project p on p.id=rp.project join SOURCE.project_organizations po on po.id=p.id where rp.id=r.id and po.organization in (
'GEORG-AUGUST-UNIVERSITAT GOTTINGEN STIFTUNG OFFENTLICHEN RECHTS', 'openorgs____::759d59f05d77188faee99b7493b46805',
'ATHINA-EREVNITIKO KENTRO KAINOTOMIAS STIS TECHNOLOGIES TIS PLIROFORIAS, TON EPIKOINONION KAI TIS GNOSIS', 'openorgs____::b84450f9864182c67b8611b5593f4250',
'Consiglio Nazionale delle Ricerche', 'openorgs____::d41cf6bd4ab1b1362a44397e0b95c975',
'Universidade do Minho') )) foo; 'openorgs____::eadc8da90a546e98c03f896661a2e4d4') )) foo;
compute stats TARGET.result; compute stats TARGET.result;
create table TARGET.result_citations as select * from SOURCE.result_citations orig where exists (select 1 from TARGET.result r where r.id=orig.id); create table TARGET.result_citations as select * from SOURCE.result_citations orig where exists (select 1 from TARGET.result r where r.id=orig.id);