query-8b913b2a1ea7c444b8ed23ab74fa2bb1
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 schema: <http://schema.org/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?SL ?sl_article ?birth ?precision where
{
?item wdt:P31 wd:Q5.
?SL schema:about ?item; # item has a sitelink
schema:isPartOf <https://sl.wikisource.org/>; # the sitelink points to sl.wikisource
schema:name ?sl_article. # and has an article name
optional {?item p:P569/psv:P569 [wikibase:timePrecision ?precision; wikibase:timeValue ?birth].} #optionally has a DoB with a stated precision
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } . #this bit gets labels for Qid values
} order by asc(?precision)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?SL"):::projected
v5("?birth"):::projected
v2("?item"):::projected
v1("?precision"):::projected
v4("?sl_article"):::projected
a2((" "))
a1((" "))
c5([https://sl.wikisource.org/]):::iri
c12(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"p:direct/P31"--> c2
v3 --"schema:about"--> v2
v3 --"schema:isPartOf"--> c5
v3 --"schema:name"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
a1 -."wikibase:timePrecision".-> v1
a1 --"wikibase:timeValue"--> v5
v2 --"p:P569"--> a2
a2 --"p:statement/value/P569"--> a1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end