query-8e7397ec80a79fcab76e723fba1e0b1c
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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
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
?bi_date ?bi_precision ?bi_rank ?bi_earliest ?bi_earliest_precision ?bi_latest ?bi_latest_precision ?bi_circaLabel ?bi_refineLabel
WHERE
{
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
?item wdt:P31 wd:Q5.
VALUES ?item { wd:Q10261 }
# date of birth
OPTIONAL {
?item p:P569 ?bi.
?bi a wikibase:BestRank.
?bi ps:P569 ?bi_date.
?bi wikibase:rank ?bi_rank.
?bi psv:P569 [ wikibase:timePrecision ?bi_precision ].
OPTIONAL { ?bi pq:P1319 ?bi_earliest.
?bi pqv:P1319 [ wikibase:timePrecision ?bi_earliest_precision ].
}
OPTIONAL { ?bi pq:P1326 ?bi_latest.
?bi pqv:P1326 [ wikibase:timePrecision ?bi_latest_precision ].
}
OPTIONAL { ?bi pq:P1480 ?bi_circa. }
OPTIONAL { ?bi pq:P4241 ?bi_refine. }
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?bi")
v10("?bi_circa")
v3("?bi_date"):::projected
v6("?bi_earliest"):::projected
v7("?bi_earliest_precision"):::projected
v8("?bi_latest"):::projected
v9("?bi_latest_precision"):::projected
v5("?bi_precision"):::projected
v4("?bi_rank"):::projected
v11("?bi_refine")
v2("?item"):::projected
a1((" "))
a2((" "))
a3((" "))
c9(["wikibase:BestRank"]):::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
v2 --"p:direct/P31"--> c6
bind0[/VALUES ?item/]
bind0-->v2
bind00(["wd:Q10261"])
bind00 --> bind0
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P569".-> v2
v2 --"a"--> c9
v2 --"p:statement/P569"--> v3
v2 --"wikibase:rank"--> v4
a1 --"wikibase:timePrecision"--> v5
v2 --"p:statement/value/P569"--> a1
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P1319".-> v6
a2 --"wikibase:timePrecision"--> v7
v2 --"p:qualifier/value/P1319"--> a2
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P1326".-> v8
a3 --"wikibase:timePrecision"--> v9
v2 --"p:qualifier/value/P1326"--> a3
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P1480".-> v10
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P4241".-> v11
end
end