query-6074a98b0f9f7262ed1949fa7c6b5818

rq turtle/ttl

Propertiessex or gender (P21)instance of (P31)

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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?objectLabel ?itemDescription WHERE { 
 ?item wdt:P21 wd:Q6581072. 
 ?item p:P31 ?isan. 
 ?isan ps:P31 ?object.
 SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } 
 FILTER(NOT EXISTS { ?item wdt:P31 wd:Q5 })
 FILTER(NOT EXISTS { ?item wdt:P31 wd:Q15632617 })
} 
ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?isan") v2("?item"):::projected v1("?itemLabel"):::projected v4("?object") c9(["bd:serviceParam"]):::iri c3(["wd:Q5"]):::iri c11(["en"]):::literal c2(["wd:Q15632617"]):::iri c5(["wd:Q6581072"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:direct/P31"--> e0c2 e0v1("?item"):::projected e0c2(["wd:Q15632617"]):::iri end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> c2 v2 --"p:direct/P31"--> c2 f1[["not "]] subgraph f1e1["Exists Clause"] e1v1 --"p:direct/P31"--> e1c2 e1v1("?item"):::projected e1c2(["wd:Q5"]):::iri end f1--EXISTS--> f1e1 f1 --> v2 f1 --> c1 f1 --> c3 v2 --"p:direct/P31"--> c3 v2 --"p:direct/P21"--> c5 v2 --"p:P31"--> v3 v3 --"p:statement/P31"--> v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end