query-6bb24830b33c4529294895d965ba7f55
连同父亲都是政府官员的官员
Use at
- https://query.wikidata.org/sparql
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#>
SELECT ?politician ?politician_label ?parent_label WHERE {
?politician wdt:P106 wd:Q82955;
wdt:P27 wd:Q148.
OPTIONAL {
?politician rdfs:label ?politician_label.
FILTER((LANG(?politician_label)) = "zh")
}
?politician wdt:P22 ?parent.
?parent wdt:P106 wd:Q82955.
OPTIONAL {
?parent rdfs:label ?parent_label.
FILTER((LANG(?parent_label)) = "zh")
}
}
ORDER BY (?politician)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?parent")
v2("?parent_label"):::projected
v1("?politician"):::projected
v3("?politician_label"):::projected
c5(["wd:Q148"]):::iri
c3(["wd:Q82955"]):::iri
v1 --"wdt:P106"--> c3
v1 --"wdt:P27"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."rdfs:label".-> v3
end
v1 --"wdt:P22"--> v4
v4 --"wdt:P106"--> c3
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."rdfs:label".-> v2
end