query-664836b3f3dd3885c0c4fad127a9c80d
Propertiesoccupation (P106)
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?odialabel WHERE {
{
SELECT ?item WHERE {
?item wdt:P106 wd:Q12299841 .
}
}
OPTIONAL {
?item rdfs:label ?label .
BIND(STR(?label) AS ?odialabel) .
}
FILTER( REGEX(LANG(?label), '^or') ) .
FILTER( BOUND(?label) ) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?item ?itemLabel ?odialabel
ORDER BY ASC(?item)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?label")
v3("?odialabel"):::projected
c3(["wd:Q12299841"]):::iri
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["bound(?label)"]]
f0 --> v2
f1[["regex(?label,'^or')"]]
f1 --> v2
v1 --"wdt:P106"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."rdfs:label".-> v2
bind2[/"str(?label)"/]
v2 --o bind2
bind2 --as--o v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end