query-8e6d94525f3f7c219bbdfb5c31e64fb0
TODO
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?wiag ?value ?valueLabel ?kinship ?kinshipLabel
WHERE
{
?item wdt:P31 wd:Q5.
?item wdt:P9441 ?wiag.
OPTIONAL {?item p:P1038 ?stat .
?stat ps:P1038 ?value .
OPTIONAL {?stat pq:P1039 ?kinship.} }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by ?item ?value
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v5("?kinship"):::projected
v4("?stat")
v2("?value"):::projected
v3("?wiag"):::projected
c8(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:direct/P31"--> c2
v1 --"p:direct/P9441"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:P1038".-> v4
v4 --"p:statement/P1038"--> v2
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P1039".-> v5
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end