From 13e9821940dc6c9ddc7bfd56efdc5df2d1792cd0 Mon Sep 17 00:00:00 2001 From: "michele.artini" Date: Fri, 21 Oct 2022 15:30:59 +0200 Subject: [PATCH] fixed a bug counting datasources --- .../sql/recent_registered_datasources_fromDate.st.sql | 4 +--- .../recent_registered_datasources_fromDate_typology.st.sql | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/dnet-exporter-api/src/main/resources/eu/dnetlib/openaire/sql/recent_registered_datasources_fromDate.st.sql b/apps/dnet-exporter-api/src/main/resources/eu/dnetlib/openaire/sql/recent_registered_datasources_fromDate.st.sql index e014461c..6d8bbf02 100644 --- a/apps/dnet-exporter-api/src/main/resources/eu/dnetlib/openaire/sql/recent_registered_datasources_fromDate.st.sql +++ b/apps/dnet-exporter-api/src/main/resources/eu/dnetlib/openaire/sql/recent_registered_datasources_fromDate.st.sql @@ -1,9 +1,7 @@ -select count(d.id) as count +select count(DISTINCT d.id) as count from dsm_services d left outer join dsm_api a on (d.id = a.service) - left outer join dsm_service_organization dso on (d.id = dso.service) - left outer join dsm_organizations o on (o.id = dso.organization) where d.registrationdate >= cast(? as date) and d.registrationdate < a.last_collection_date diff --git a/apps/dnet-exporter-api/src/main/resources/eu/dnetlib/openaire/sql/recent_registered_datasources_fromDate_typology.st.sql b/apps/dnet-exporter-api/src/main/resources/eu/dnetlib/openaire/sql/recent_registered_datasources_fromDate_typology.st.sql index 7abca790..9e8a9f0b 100644 --- a/apps/dnet-exporter-api/src/main/resources/eu/dnetlib/openaire/sql/recent_registered_datasources_fromDate_typology.st.sql +++ b/apps/dnet-exporter-api/src/main/resources/eu/dnetlib/openaire/sql/recent_registered_datasources_fromDate_typology.st.sql @@ -1,9 +1,7 @@ -select count(d.id) as count +select count(DISTINCT d.id) as count from dsm_services d left outer join dsm_api a on (d.id = a.service) - left outer join dsm_service_organization dso on (d.id = dso.service) - left outer join dsm_organizations o on (o.id = dso.organization) where d.registrationdate >= cast(? as date) and d._typology_to_remove_ like ?