query-b9cd779e20b777dd3c6da78c6204f9b0
Propertiessex or gender (P21)TED speaker ID (P2611)occupation (P106)instance of (P31)subclass of (P279)image (P18)
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 DISTINCT ?item ?itemLabel ?value ?occLabel ?image
WHERE
{
?item wdt:P21 wd:Q6581072.
?item wdt:P2611 ?value.
?item wdt:P106 ?occ.
{?occ wdt:P31 wd:Q901}
UNION {?occ wdt:P279* wd:Q901}.
OPTIONAL {?item wdt:P18 ?image}.
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;
v4("?image"):::projected
v1("?item"):::projected
v3("?occ")
v2("?value"):::projected
c10(["bd:serviceParam"]):::iri
c6(["wd:Q901"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q6581072"]):::iri
v1 --"wdt:P21"--> c2
v1 --"wdt:P2611"--> v2
v1 --"wdt:P106"--> v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P279"--> c6
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P31"--> c6
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end