Created
March 26, 2018 20:06
-
-
Save mwdchang/b5b107eb5dcde19a8159622a85f66ae9 to your computer and use it in GitHub Desktop.
SPARQL scratch pad
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
################################################################## | |
# Get count of predicates | |
################################################################## | |
SELECT ?p (COUNT(?o) AS ?cnt) | |
WHERE { ?s ?p ?o } | |
GROUP BY ?p | |
ORDER BY DESC(?cnt) | |
################################################################## | |
# Get subject with predicate and object matching | |
################################################################## | |
PREFIX P1: <http://ontology.com/ontology/typesy#> | |
PREFIX P2: <http://ontology.com/ontology/blah/> | |
SELECT ?dctest ?textValue | |
WHERE | |
{ | |
?dctest rdf:type P1:Some_Type . | |
?dctest P2:has_text_value ?textValue | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment