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

13 lines
351 B
MySQL
Raw Normal View History

2022-10-21 15:30:59 +02:00
select count(DISTINCT d.id) as count
2022-02-04 10:12:15 +01:00
from
2022-02-07 10:33:09 +01:00
dsm_services d
left outer join dsm_api a on (d.id = a.service)
2022-02-04 10:12:15 +01:00
where
d.registrationdate >= cast(? as date)
and d._typology_to_remove_ 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;