query-f8f9de12f64db7e3195dea61b161b232
TODO
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 distinct ?item ?itemLabel ?caricaLabel ?governoLabel ?inizio ?fine
WHERE
{
VALUES ?role {wd:Q3858501 wd:Q796897}
?item p:P39 ?statement .
?statement ps:P39 ?carica.
?carica wdt:P279* ?role.
OPTIONAL{?statement pq:P5054 ?governo. }
OPTIONAL{?statement pq:P580 ?inizio .}
OPTIONAL{?statement pq:P582 ?fine .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
ORDER BY ?caricaLabel ?inizio ?fine
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?carica")
v1("?caricaLabel"):::projected
v3("?fine"):::projected
v8("?governo")
v2("?inizio"):::projected
v5("?item"):::projected
v4("?role")
v6("?statement")
c8(["bd:serviceParam"]):::iri
c10(["it"]):::literal
bind0[/VALUES ?role/]
bind0-->v4
bind00(["wd:Q3858501"])
bind00 --> bind0
bind01(["wd:Q796897"])
bind01 --> bind0
v5 --"p:P39"--> v6
v6 --"p:statement/P39"--> v7
v7 --"p:direct/P279"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v6 -."p:qualifier/P5054".-> v8
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v6 -."p:qualifier/P580".-> v2
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v6 -."p:qualifier/P582".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end