dnet-applications/apps/dnet-exporter-api/src/main/resources/eu/dnetlib/openaire/sql/recent_registered_datasourc...

15 lines
480 B
MySQL
Raw Normal View History

2022-02-04 10:12:15 +01:00
select count(d.id) as count
from
2022-02-07 10:33:09 +01:00
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)
2022-02-04 10:12:15 +01:00
left outer join dsm_organizations o on (o.id = dso.organization)
where
d.registrationdate >= cast(? as date)
2022-03-24 12:26:14 +01:00
and d.eosc_datasource_type like ?
2022-02-04 10:12:15 +01:00
and d.registrationdate < a.last_collection_date
and d.registeredby is not null
and d.managed = true
and a.last_collection_total > 0
and a.active = true;