query-6fd867920ee7d03ff3ad13ea828322dc
08:42, 6 September 2017 (UTC) Andy's edits; Talk to Andy); Pigsonthewing (Andy MabbettCan anyone see why the specified items' data is not showing? 08:46, 6 September 2017 (UTC)) talk (Matěj Suchánek block, then it will work. OPTIONALYou need to have each optional statement in a single Like this? ┘────────────────────────────────────────────────────────────────────────────────────────────────────┌
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 ?human ?image ?dod ?pobLabel ?occupation ?occupationLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?human wdt:P31 wd:Q5.
?human wdt:P39 wd:Q16707842.
?human wdt:P39 wd:Q28841847.
OPTIONAL {
?human wdt:P18 ?image.
}
OPTIONAL {
?human wdt:P570 ?dod.
}
OPTIONAL {
?human wdt:P19 ?pob.
}
OPTIONAL {
?human wdt:P106 ?occupation.
}
}
LIMIT 1000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?dod"):::projected
v1("?human"):::projected
v2("?image"):::projected
v5("?occupation"):::projected
v4("?pob")
c8(["wd:Q16707842"]):::iri
c9(["wd:Q28841847"]):::iri
c2(["bd:serviceParam"]):::iri
c6(["wd:Q5"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"wdt:P31"--> c6
v1 --"wdt:P39"--> c8
v1 --"wdt:P39"--> c9
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P570".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P19".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P106".-> v5
end