query-c655c10cd79afe90583e0cc7e4243149

rq turtle/ttl

Removal of unsourced P91 statements of unsourced statements contains also items about fictional characters, you might want to find new violations with this query: complex constraints report. Since the is provided as wellvalid sourceif a (August 2016), I removed all unsourced P91 statements from items about humans (almost 5000 statements). This data can of course be added again, Wikidata:Project chat/Archive/2016/08#Unsourced and Wikipedia sourced P91 statements (September/October 2016) and Wikidata:Project chat#Unsourced sexual orientation (P91) statementsFollowing discussions at

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?sexualOrientation ?sexualOrientationLabel WHERE { 
  ?item wdt:P31 wd:Q5 .
  ?item p:P91 ?foo . 
  ?foo ps:P91 ?sexualOrientation . 
  OPTIONAL{ ?foo prov:wasDerivedFrom ?source } 
  FILTER(!bound(?source))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?foo") v2("?item"):::projected v4("?sexualOrientation"):::projected v1("?source") c7(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c9(["en"]):::literal f0[["not bound(?source)"]] f0 --> v1 v2 --"p:direct/P31"--> c2 v2 --"p:P91"--> v3 v3 --"p:statement/P91"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."prov:wasDerivedFrom".-> v1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end