query-c965848b2b68743a113c0b9bba3787a3
SPARQL query
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?name ?nameLabel (STRAFTER(STRAFTER(?parlID,"/"),"/") AS ?id) ?identifier__pims WHERE {
?name wdt:P39 wd:Q30524710 .
OPTIONAL { ?name wdt:P1996 ?parlID }
OPTIONAL { ?name wdt:P2170 ?identifier__pims}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?id")
v3("?identifier__pims"):::projected
v1("?name"):::projected
v2("?parlID"):::projected
c6(["bd:serviceParam"]):::iri
c2(["wd:Q30524710"]):::iri
c8(["en"]):::literal
v1 --"wdt:P39"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P1996".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P2170".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind0[/"substring-after(substring-after(?parlID,'/'),'/')"/]
v2 --o bind0
bind0 --as--o v4