query-cd50324cc984d739d1bb780dbf14d5a3
Llista de titulars d'un càrrec específic amb dades del càrrec i de la persona
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 ?item ?itemLabel ?inici ?final ?abans ?abansLabel ?despres ?despresLabel ?partit
?gabinet ?gabinetLabel ?legislatura ?legislaturaLabel ?color__hexadecimal_sRGB_ ?imatge WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item p:P39 ?statement.
?statement ps:P39 ?carrec.
OPTIONAL { ?statement pq:P580 ?inici.}
OPTIONAL { ?statement pq:P582 ?final. }
OPTIONAL { ?statement pq:P1365 ?abans. }
OPTIONAL { ?statement pq:P1366 ?despres. }
OPTIONAL { ?statement pq:P5054 ?gabinet. }
OPTIONAL { ?statement pq:P2937 ?legislatura. }
OPTIONAL { ?item wdt:P18 ?imatge. }
OPTIONAL { ?item wdt:P102 ?partit. }
OPTIONAL { ?partit wdt:P465 ?color__hexadecimal_sRGB_. }
FILTER(?carrec = wd:Q30101464)
}
ORDER BY (?inici)
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?abans"):::projected
v2("?carrec")
v12("?color__hexadecimal_sRGB_"):::projected
v7("?despres"):::projected
v5("?final"):::projected
v8("?gabinet"):::projected
v10("?imatge"):::projected
v1("?inici"):::projected
v3("?item"):::projected
v9("?legislatura"):::projected
v11("?partit"):::projected
v4("?statement")
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?carrec = 'wd:Q30101464'"]]
f0 --> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
v3 --"p:P39"--> v4
v4 --"p:statement/P39"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P580".-> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P582".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P1365".-> v6
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P1366".-> v7
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P5054".-> v8
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P2937".-> v9
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P18".-> v10
end
subgraph optional7["(optional)"]
style optional7 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P102".-> v11
end
subgraph optional8["(optional)"]
style optional8 fill:#bbf,stroke-dasharray: 5 5;
v11 -."p:direct/P465".-> v12
end