query-88a4d6ebfffa169999fdf9f60b1dac8e
Missing references with a person should be referenced. Here is SPARQL query that identifies problematic items: (P1399)convicted of Any claim using
Use at
- https://query.wikidata.org/sparql
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
select ?person ?name ?crime_label where {
?person wdt:P31 wd:Q5 .
?person p:P1399 ?crime_statement .
?crime_statement ps:P1399 ?crime .
filter not exists { ?crime_statement prov:wasDerivedFrom ?ref . }
optional { ?person rdfs:label ?name . FILTER (LANG(?name) = "en") }
optional { ?crime rdfs:label ?crime_label . FILTER (LANG(?crime_label) = "en") }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?crime")
v1("?crime_label"):::projected
v2("?crime_statement")
v4("?name"):::projected
v5("?person"):::projected
v3("?ref")
c4(["wd:Q5"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"prov:wasDerivedFrom"--> e0v2
e0v1("?crime_statement"):::projected
e0v2("?ref"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c2
f0 --> v3
v2 --"prov:wasDerivedFrom"--> v3
v5 --"p:direct/P31"--> c4
v5 --"p:P1399"--> v2
v2 --"p:statement/P1399"--> v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."rdfs:label".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v6 -."rdfs:label".-> v1
end