query-6466a70570404ba240e6a82218c09f06
: This. It does not deal with duplicate P1705 entries - you get one row per. It's possible to filter on native name by language, or to group_concat them, should you wish.J budissin@ Looks like Tagishsimon was quicker. Anyways, here is mine:
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 schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?itemDescription ?lde ?lhsb ?dde ?dhsb ?coor ?nlde ?nlhsb
{
?item wdt:P131+ wd:Q571947 .
?item wdt:P31 wd:Q532 .
OPTIONAL { ?item wdt:P1705 ?nlde . FILTER( lang(?nlde) = "de") }
OPTIONAL { ?item wdt:P1705 ?nlhsb . FILTER( lang(?nlhsb) = "hsb") }
OPTIONAL { ?item rdfs:label ?lde . FILTER( lang(?lde) = "de") }
OPTIONAL { ?item rdfs:label ?lhsb . FILTER( lang(?lhsb) = "hsb") }
OPTIONAL { ?item schema:description ?dde . FILTER( lang(?dde) = "de") }
OPTIONAL { ?item schema:description ?dhsb . FILTER( lang(?dhsb) = "hsb") }
OPTIONAL { ?item wdt:P625 ?coor }
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;
v8("?coor"):::projected
v2("?dde"):::projected
v1("?dhsb"):::projected
v7("?item"):::projected
v4("?lde"):::projected
v3("?lhsb"):::projected
v6("?nlde"):::projected
v5("?nlhsb"):::projected
c6(["wd:Q532"]):::iri
c12(["bd:serviceParam"]):::iri
c4(["wd:Q571947"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v7 --"wdt:P131"--> c4
v7 --"wdt:P31"--> c6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v7 -."wdt:P1705".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v7 -."wdt:P1705".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v7 -."rdfs:label".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v7 -."rdfs:label".-> v3
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v7 -."schema:description".-> v2
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v7 -."schema:description".-> v1
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v7 -."wdt:P625".-> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end