query-3e23dd2d5e1db2c668e94bb1fffdae30
Query for students
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#>
SELECT ?person ?personLabel ?start ?end (GROUP_CONCAT(DISTINCT ?saias; separator=", ") as ?saia)
WHERE {
?person p:P69 [ ps:P69 wd:Q1576779 ; pq:P580 ?sd ; pq:P582 ?ed ] .
OPTIONAL { ?person wdt:P9536 ?saias . }
BIND(YEAR(?sd) AS ?start)
BIND(YEAR(?ed) AS ?end)
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
GROUP BY ?person ?personLabel ?start ?end
ORDER BY ?start
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?ed")
v6("?end"):::projected
v4("?person"):::projected
v7("?saia")
v5("?saias"):::projected
v2("?sd")
v6("?start"):::projected
a1((" "))
c2(["wd:Q1576779"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["it"]):::literal
a1 --"p:statement/P69"--> c2
a1 --"p:qualifier/P580"--> v2
a1 --"p:qualifier/P582"--> v3
v4 --"p:P69"--> a1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P9536".-> v5
end
bind0[/"year-from-dateTime(?sd)"/]
v2 --o bind0
bind0 --as--o v6
bind1[/"year-from-dateTime(?ed)"/]
v3 --o bind1
bind1 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind3[/"?saias"/]
v5 --o bind3
bind3 --as--o v7