Changes to indicators and funders definition #372

Merged
claudio.atzori merged 23 commits from antonis.lempesis/dnet-hadoop:beta into beta 2024-03-26 08:46:21 +01:00
1 changed files with 7 additions and 3 deletions
Showing only changes of commit 2e4cab026c - Show all commits

View File

@ -1210,6 +1210,10 @@ where ri.license is not null and datasource.type like '%Repository%' and datasou
on p.id= tmp.id; on p.id= tmp.id;
create table ${stats_db_name}.result_country stored as parquet as create table ${stats_db_name}.result_country stored as parquet as
select distinct ro.id, o.country from ${stats_db_name}.result_organization ro select distinct ro.id, coalesce(o.country, f.country)
join ${stats_db_name}.organization o on o.id=ro.organization from ${stats_db_name}.result_organization ro
join ${stats_db_name}.funder f on f.country=o.country; left outer join ${stats_db_name}.organization o on o.id=ro.organization
left outer join ${stats_db_name}.result_projects rp on rp.id=ro.id
left outer join ${stats_db_name}.project p on p.id=rp.project
left outer join ${stats_db_name}.funder f on f.name=p.funder
where coalesce(o.country, f.country) IS NOT NULL;