Created
May 8, 2014 01:47
-
-
Save prologic/c6a9b976e568b38a6748 to your computer and use it in GitHub Desktop.
[SAPRQL]: Find all Graphs with cs:subjectOfChange
This file contains 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
PREFIX cs: <http://purl.org/vocab/changeset/schema#> | |
SELECT DISTINCT ?item WHERE { | |
GRAPH ?g { | |
?item a cs:subjectOfChange . | |
} | |
} |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX cs: <http://purl.org/vocab/changeset/schema#>
SELECT DISTINCT ?item WHERE {
GRAPH ?g {
?item rdf:type cs:subjectOfChange .
}
}
Solved.
$ cat count.sparql
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX cs: <http://purl.org/vocab/changeset/schema#>
SELECT (COUNT(DISTINCT ?item) AS ?count) WHERE {
?item cs:subjectOfChange ?uri
}
$ cat csets.sparql
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX cs: <http://purl.org/vocab/changeset/schema#>
SELECT DISTINCT ?item ?uri WHERE {
?item cs:subjectOfChange ?uri
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The above is not quite right (My SPARQL skills sucks). No results.