query-9cc71d74885af83f0e454f02b91df490
title:Allievi della Scuola Normale Superiore per classe frequentata e periodo SELECT ?persona ?personaLabel ?classeLabel ?inizio ?fine ?ruoloLabel ?titoloLabel WHERE { ?persona p:P69 ?st . ?st ps:P69 ?classe ; pq:P580 ?start ; pq:P582 ?end ; pq:P2868 ?ruolo . ?classe wdt:P361 wd:Q672416 . OPTIONAL { ?st pq:P512 ?titolo } . BIND(YEAR(?start) AS ?inizio) BIND(YEAR(?end) AS ?fine) SERVICE wikibase:label { bd:serviceParam wikibase:language "it". } } ORDER BY ?inizio ?fine ?personaLabel
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:Allievi della Scuola Normale Superiore per classe frequentata e periodo
SELECT ?persona ?personaLabel ?classeLabel ?inizio ?fine ?ruoloLabel ?titoloLabel
WHERE {
?persona p:P69 ?st .
?st ps:P69 ?classe ; pq:P580 ?start ; pq:P582 ?end ; pq:P2868 ?ruolo . ?classe wdt:P361 wd:Q672416 .
OPTIONAL { ?st pq:P512 ?titolo } .
BIND(YEAR(?start) AS ?inizio)
BIND(YEAR(?end) AS ?fine)
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
ORDER BY ?inizio ?fine ?personaLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?classe")
v8("?end")
v11("?fine"):::projected
v11("?inizio"):::projected
v4("?persona"):::projected
v3("?personaLabel"):::projected
v9("?ruolo")
v5("?st")
v7("?start")
v10("?titolo")
c10(["bd:serviceParam"]):::iri
c7(["wd:Q672416"]):::iri
c12(["it"]):::literal
v4 --"p:P69"--> v5
v5 --"p:statement/P69"--> v6
v5 --"p:qualifier/P580"--> v7
v5 --"p:qualifier/P582"--> v8
v5 --"p:qualifier/P2868"--> v9
v6 --"p:direct/P361"--> c7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."p:qualifier/P512".-> v10
end
bind0[/"year-from-dateTime(?start)"/]
v7 --o bind0
bind0 --as--o v11
bind1[/"year-from-dateTime(?end)"/]
v8 --o bind1
bind1 --as--o v11
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end