query-def351e095f9e6e72709b17d32acac3d

rq turtle/ttl

title:Lista delle persone che hanno lavorato per il KNIR, con anni di inizio e fine (se noti) SELECT ?person ?personLabel WHERE { ?person p:P108 ?st . ?st ps:P108 wd:Q1945883 . OPTIONAL { ?st pq:P580 ?sd . BIND(YEAR(?sd) AS ?start) } OPTIONAL { ?st pq:P582 ?ed . BIND(YEAR(?ed) AS ?start) } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

Use at

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#>
#title:Lista delle persone che hanno lavorato per il KNIR, con anni di inizio e fine (se noti)
SELECT ?person ?personLabel
WHERE {
  ?person p:P108 ?st . ?st ps:P108 wd:Q1945883 .
  OPTIONAL { ?st pq:P580 ?sd . BIND(YEAR(?sd) AS ?start) }
  OPTIONAL { ?st pq:P582 ?ed . BIND(YEAR(?ed) AS ?start) }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?ed") v1("?person"):::projected v3("?sd") v2("?st") v6("?start") c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q1945883"]):::iri v1 --"p:P108"--> v2 v2 --"p:statement/P108"--> c3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P580".-> v3 bind0[/"year-from-dateTime(?sd)"/] v3 --o bind0 bind0 --as--o v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P582".-> v5 bind1[/"year-from-dateTime(?ed)"/] v5 --o bind1 bind1 --as--o v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end