Skip to content

Instantly share code, notes, and snippets.

@yawnston
Created November 22, 2021 19:11
Show Gist options
  • Save yawnston/19a6ab28accff7bfd99b2177d7d22ff3 to your computer and use it in GitHub Desktop.
Save yawnston/19a6ab28accff7bfd99b2177d7d22ff3 to your computer and use it in GitHub Desktop.
opendata-invalid-response-query.sparql
SELECT *
WHERE {
{
SELECT DISTINCT ?x ?pDomain (if(( ?pRangeLiteral = "" ), ?ppRange, ?pRangeLiteral) AS ?pRange)
WHERE {{
SELECT DISTINCT ?x ?pDomain ?ppRange (if(isLiteral(?o), <http://hypergraphql.org/schema/Literal>, "") AS ?pRangeLiteral)
WHERE{
?s ?x ?o
OPTIONAL { ?o a ?ppRange }
OPTIONAL { ?s a ?pDomain }
}
}}
}
?x
(
(
((<http://www.w3.org/2000/01/rdf-schema#subPropertyOf>|<http://www.w3.org/2002/07/owl#equivalentProperty>)|<http://www.w3.org/2002/07/owl#sameAs>)
|
<http://www.w3.org/2002/07/owl#equivalentClass>
)
|
^(
(<http://www.w3.org/2002/07/owl#equivalentProperty>|<http://www.w3.org/2002/07/owl#sameAs>)|<http://www.w3.org/2002/07/owl#equivalentClass>
)
)*
?predicate .
}
ORDER BY ?predicate ?pDomain ?pRange
LIMIT 10
OFFSET 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment