query-9e8b8216f8f90e637520a51dba407c03
title:Presidenti della CRUI
SELECT DISTINCT ?item ?itemLabel ?ordinal ?birthyear ?deadyear ?startyear ?endyear ?sbn
WHERE {
?item p:P39 ?position .
?position ps:P39 wd:Q110573215 .
?position pq:P1545 ?ordinal .
OPTIONAL { ?item wdt:P569 ?db } .
OPTIONAL { ?item wdt:P570 ?dd } .
OPTIONAL { ?position pq:P580 ?st } .
OPTIONAL { ?position pq:P582 ?en } .
OPTIONAL { ?item wdt:P396 ?sbn } .
BIND(STR(YEAR(?db)) AS ?birthyear)
BIND(STR(YEAR(?dd)) AS ?deadyear)
BIND(STR(YEAR(?st)) AS ?startyear)
BIND(STR(YEAR(?en)) AS ?endyear)
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
ORDER BY ASC(xsd:integer(?ordinal))
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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:Presidenti della CRUI
SELECT DISTINCT ?item ?itemLabel ?ordinal ?birthyear ?deadyear ?startyear ?endyear ?sbn
WHERE {
?item p:P39 ?position .
?position ps:P39 wd:Q110573215 .
?position pq:P1545 ?ordinal .
OPTIONAL { ?item wdt:P569 ?db } .
OPTIONAL { ?item wdt:P570 ?dd } .
OPTIONAL { ?position pq:P580 ?st } .
OPTIONAL { ?position pq:P582 ?en } .
OPTIONAL { ?item wdt:P396 ?sbn } .
BIND(STR(YEAR(?db)) AS ?birthyear)
BIND(STR(YEAR(?dd)) AS ?deadyear)
BIND(STR(YEAR(?st)) AS ?startyear)
BIND(STR(YEAR(?en)) AS ?endyear)
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
ORDER BY ASC(xsd:integer(?ordinal))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v9("?birthyear"):::projected
v4("?db")
v5("?dd")
v10("?deadyear"):::projected
v7("?en")
v12("?endyear"):::projected
v2("?item"):::projected
v1("?ordinal"):::projected
v3("?position")
v8("?sbn"):::projected
v6("?st")
v11("?startyear"):::projected
c3(["wd:Q110573215"]):::iri
c13(["it"]):::literal
c11(["bd:serviceParam"]):::iri
v2 --"p:P39"--> v3
v3 --"p:statement/P39"--> c3
v3 --"p:qualifier/P1545"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P569".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P570".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P580".-> v6
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P582".-> v7
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P396".-> v8
end
bind0[/"str(year-from-dateTime(?db))"/]
v4 --o bind0
bind0 --as--o v9
bind1[/"str(year-from-dateTime(?dd))"/]
v5 --o bind1
bind1 --as--o v10
bind2[/"str(year-from-dateTime(?st))"/]
v6 --o bind2
bind2 --as--o v11
bind3[/"str(year-from-dateTime(?en))"/]
v7 --o bind3
bind3 --as--o v12
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end