Skip to content

Instantly share code, notes, and snippets.

@tts tts/gist:5134779
Created Mar 11, 2013

Embed
What would you like to do?
SPARQL query: object type, contributor and count of distinct objects in Europeana with the GeoNameID of Finland
# Full namespace declarations for a quicker inclusion in e.g. query sentence of SPARQL R package
#
# Tuija Sonkkila 11.3.2013
SELECT ?type ?contrib (COUNT(DISTINCT ?object) AS ?count)
WHERE {
?euProxy <http://www.openarchives.org/ore/terms/proxyFor> ?object ;
<http://www.europeana.eu/schemas/edm/hasMet> <http://sws.geonames.org/660013/> ;
<http://www.openarchives.org/ore/terms/proxyIn> ?euAggr .
?euAggr <http://www.openarchives.org/ore/terms/aggregates> ?providerAggr .
?resourceMap <http://www.openarchives.org/ore/terms/describes> ?euAggr ;
<http://purl.org/dc/elements/1.1/contributor> ?contrib .
?providerProxy <http://www.openarchives.org/ore/terms/proxyIn> ?providerAggr ;
<http://www.europeana.eu/schemas/edm/type> ?type .
} GROUP BY ?type ?contrib
HAVING (?count > 1)
ORDER BY DESC(?count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.