query-d0a80b2edb592afa38d3bf6547caf845
Propertiessex or gender (P21)occupation (P106)instance of (P31)subclass of (P279)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel
WHERE
{
?item wdt:P21 wd:Q6581072.
?item wdt:P106 ?occ.
{?occ wdt:P31 wd:Q901}
UNION {?occ wdt:P279* wd:Q901}.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?occ")
c8(["bd:serviceParam"]):::iri
c5(["wd:Q901"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q6581072"]):::iri
v1 --"wdt:P21"--> c2
v1 --"wdt:P106"--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P279"--> c5
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> c5
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end