forked from D-Net/dnet-hadoop
Update createIndicatorsTablesSprint1.sql
This commit is contained in:
parent
264939a01a
commit
3d42652c44
|
@ -1,23 +1,3 @@
|
|||
create table TARGET.indi_project_pubs_count stored as parquet as
|
||||
select pr.id id, count(p.id) total_pubs from SOURCE.project_results pr
|
||||
join SOURCE.publication p on p.id=pr.result
|
||||
group by pr.id
|
||||
|
||||
create table TARGET.indi_project_datasets_count stored as parquet as
|
||||
select pr.id id, count(d.id) total_datasets from SOURCE.project_results pr
|
||||
join SOURCE.dataset d on d.id=pr.result
|
||||
group by pr.id
|
||||
|
||||
create table TARGET.indi_project_software_count stored as parquet as
|
||||
select pr.id id, count(s.id) total_software from SOURCE.project_results pr
|
||||
join SOURCE.software s on s.id=pr.result
|
||||
group by pr.id
|
||||
|
||||
create table TARGET.indi_project_otherresearch_count stored as parquet as
|
||||
select pr.id id, count(o.id) total_other from SOURCE.project_results pr
|
||||
join SOURCE.otherresearchproduct o on o.id=pr.result
|
||||
group by pr.id
|
||||
|
||||
create table TARGET.indi_pub_green_oa stored as parquet as
|
||||
select distinct p.id, coalesce(green_oa, 0) as green_oa
|
||||
from SOURCE.publication p
|
||||
|
|
Loading…
Reference in New Issue