query-d8b80ad960ae5e1a2d9cec4d8df342bf
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?municipality_of_the_Czech_Republic ?en_label ?ru_label ?country ?countryLabel ?population ?located ?en_located_label ?ru_located_label WHERE {
?municipality_of_the_Czech_Republic wdt:P31 wd:Q5153359.
OPTIONAL { ?municipality_of_the_Czech_Republic rdfs:label ?en_label . filter(lang(?en_label)="en") }
OPTIONAL { ?municipality_of_the_Czech_Republic rdfs:label ?ru_label . filter(lang(?ru_label)="ru") }
OPTIONAL { ?municipality_of_the_Czech_Republic wdt:P17 ?country. }
OPTIONAL { ?municipality_of_the_Czech_Republic wdt:P1082 ?population. }
OPTIONAL { ?municipality_of_the_Czech_Republic wdt:P131 ?located .
OPTIONAL { ?located rdfs:label ?en_located_label . filter(lang(?en_located_label)="en") }
OPTIONAL { ?located rdfs:label ?ru_located_label . filter(lang(?ru_located_label)="ru") } }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?country"):::projected
v2("?en_label"):::projected
v7("?en_located_label"):::projected
v8("?located"):::projected
v3("?municipality_of_the_Czech_Republic"):::projected
v5("?population"):::projected
v1("?ru_label"):::projected
v6("?ru_located_label"):::projected
c4(["wd:Q5153359"]):::iri
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v3 --"wdt:P31"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."rdfs:label".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."rdfs:label".-> v1
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P17".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P1082".-> v5
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P131".-> v8
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v8 -."rdfs:label".-> v7
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v8 -."rdfs:label".-> v6
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end