Skip to content

Instantly share code, notes, and snippets.

@mdlincoln
Last active Aug 29, 2015
Embed
What would you like to do?
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX tgn: <http://vocab.getty.edu/tgn/>
PREFIX xl: <http://www.w3.org/2008/05/skos-xl#>
SELECT ?concept ?conceptname (COUNT(?changenote) as ?numchanges)
WHERE {
?concept skos:inScheme tgn: .
?concept skos:changeNote ?changenote .
?concept xl:prefLabel ?labelnode .
?labelnode xl:literalForm ?conceptname .
FILTER (lang(?conceptname) = "en")
}
GROUP BY ?concept ?conceptname
ORDER BY DESC(?numchanges)
LIMIT 100
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX tgn: <http://vocab.getty.edu/tgn/>
PREFIX xl: <http://www.w3.org/2008/05/skos-xl#>
SELECT DISTINCT ?change ?changetype ?changedesc ?changedate
WHERE {
# Look up all the changes for "Afghanistan"
tgn:7016612 skos:changeNote ?change .
OPTIONAL { ?change dc:type ?changetype . }
OPTIONAL { ?change dc:description ?changedesc . }
OPTIONAL { ?change prov:startedAtTime ?changedate . }
}
ORDER BY ?changedate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment