query-49781884600034d92f7e7b391f5ecc02
title:Lista degli allievi della SAIA, per anno di frequenza (con anni di nascita e morte se noti) SELECT ?person ?personLabel ?birthyear ?deathyear ?start ?end WHERE { ?person p:P69 [ ps:P69 wd:Q1576779 ; pq:P580 ?sd ; pq:P582 ?ed ] . BIND(YEAR(?sd) AS ?start) BIND(YEAR(?ed) AS ?end) OPTIONAL { ?person wdt:P569 ?born . BIND(YEAR(?born) AS ?birthyear) } OPTIONAL { ?person wdt:P570 ?died . BIND(YEAR(?died) AS ?deathyear) } SERVICE wikibase:label { bd:serviceParam wikibase:language "it". } } ORDER BY ?start
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#>
#title:Lista degli allievi della SAIA, per anno di frequenza (con anni di nascita e morte se noti)
SELECT ?person ?personLabel ?birthyear ?deathyear ?start ?end
WHERE {
?person p:P69 [ ps:P69 wd:Q1576779 ; pq:P580 ?sd ; pq:P582 ?ed ] .
BIND(YEAR(?sd) AS ?start)
BIND(YEAR(?ed) AS ?end)
OPTIONAL { ?person wdt:P569 ?born . BIND(YEAR(?born) AS ?birthyear) }
OPTIONAL { ?person wdt:P570 ?died . BIND(YEAR(?died) AS ?deathyear) }
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
ORDER BY ?start
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?birthyear"):::projected
v6("?born")
v9("?deathyear"):::projected
v8("?died")
v3("?ed")
v5("?end"):::projected
v4("?person"):::projected
v2("?sd")
v5("?start"):::projected
a1((" "))
c2(["wd:Q1576779"]):::iri
c9(["bd:serviceParam"]):::iri
c11(["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 optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P569".-> v6
bind2[/"year-from-dateTime(?born)"/]
v6 --o bind2
bind2 --as--o v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P570".-> v8
bind3[/"year-from-dateTime(?died)"/]
v8 --o bind3
bind3 --as--o v9
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end