Created
June 8, 2022 13:52
-
-
Save michimau/5323ed4cff774bc30c9b89cd3955ca73 to your computer and use it in GitHub Desktop.
datahub sparql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX DataFileLink: <http://www.eea.europa.eu/portal_types/DataFileLink#> | |
PREFIX dcterms: <http://purl.org/dc/terms/> | |
PREFIX data: <http://www.eea.europa.eu/portal_types/Data#> | |
SELECT | |
?data | |
?id | |
?remoteUrl | |
min(xsd:integer(?temporalCoverage)) AS ?minYear | |
max(xsd:integer(?temporalCoverage)) AS ?maxYear | |
WHERE { | |
?DataFileLink a DataFileLink:DataFileLink . | |
?DataFileLink dcterms:title ?title . | |
?DataFileLink DataFileLink:remoteUrl ?remoteUrl . | |
?dataTable dcterms:hasPart ?DataFileLink . | |
?data dcterms:hasPart ?dataTable . | |
?data data:id ?id . | |
?data data:temporalCoverage ?temporalCoverage . | |
FILTER NOT EXISTS { ?data dcterms:isReplacedBy ?isReplacedBy } | |
FILTER(strEnds(str(?remoteUrl), "download")) | |
} | |
ORDER BY ?id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment