query-8ea3aaced7d0e04fd725af138b1a0df6

rq turtle/ttl

humans who are childless SELECT ?human ?humanName { ?human wdt:P31 wd:Q5 . ?human p:P40 ?childStatement . ?childStatement a wdno:P40 . OPTIONAL { ?human rdfs:label ?humanName filter (lang(?humanName) = "en") } } LIMIT 100

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
#humans who are childless
SELECT ?human ?humanName {
  ?human wdt:P31 wd:Q5 .
  ?human p:P40 ?childStatement .
  ?childStatement a wdno:P40 .
  OPTIONAL { ?human rdfs:label ?humanName filter (lang(?humanName) = "en") }
} LIMIT 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?childStatement") v2("?human"):::projected v1("?humanName"):::projected c3(["wd:Q5"]):::iri c6(["p:novalue/P40"]):::iri v2 --"p:direct/P31"--> c3 v2 --"p:P40"--> v3 v3 --"a"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."rdfs:label".-> v1 end