query-40517c0d6b9df8e9780f66af2a05117e
Years instead of complete dates
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
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 ?person ?personLabel ?sdy ?edy
WHERE {
?person p:P69 [ ps:P69 wd:Q1576779 ; pq:P580 ?sd ; pq:P582 ?ed ] .
BIND(YEAR(?sd) AS ?sdy)
BIND(YEAR(?ed) AS ?edy)
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
ORDER BY ?sdy
Query found at
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/Queries
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/sandbox
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?ed")
v5("?edy"):::projected
v4("?person"):::projected
v2("?sd")
v5("?sdy"):::projected
a1((" "))
c2(["wd:Q1576779"]):::iri
c7(["bd:serviceParam"]):::iri
c9(["it"]):::literal
a1 --"p:statement/P69"--> c2
a1 --"p:qualifier/P580"--> v2
a1 --"p:qualifier/P582"--> v3
v4 --"p:P69"--> a1
bind0[/"year-from-dateTime(?sd)"/]
v2 --o bind0
bind0 --as--o v5
bind1[/"year-from-dateTime(?ed)"/]
v3 --o bind1
bind1 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end