query-fa21f495ac5be25fdfbf49a3bace0eca
Query for checking import
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?place (GROUP_CONCAT(?instLabel;separator=", ") AS ?instances) ?placeLabelEn ?placeLabelEl ?placeLabelEs ?placeLabelIt ?tt
WHERE {
?place wdt:P8068 ?tt .
OPTIONAL { ?place wdt:P31 ?inst . }
OPTIONAL { SERVICE wikibase:label { bd:serviceParam wikibase:language "en". ?inst rdfs:label ?instLabel . } }
OPTIONAL { SERVICE wikibase:label { bd:serviceParam wikibase:language "en". ?place rdfs:label ?placeLabelEn . } }
OPTIONAL { SERVICE wikibase:label { bd:serviceParam wikibase:language "el". ?place rdfs:label ?placeLabelEl . } }
OPTIONAL { SERVICE wikibase:label { bd:serviceParam wikibase:language "es". ?place rdfs:label ?placeLabelEs . } }
OPTIONAL { SERVICE wikibase:label { bd:serviceParam wikibase:language "it". ?place rdfs:label ?placeLabelIt . } }
}
GROUP BY ?place ?placeLabelEn ?placeLabelEl ?placeLabelEs ?placeLabelIt ?tt
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?inst")
v4("?instLabel"):::projected
v9("?instances")
v1("?place"):::projected
v6("?placeLabelEl"):::projected
v5("?placeLabelEn"):::projected
v7("?placeLabelEs"):::projected
v8("?placeLabelIt"):::projected
v2("?tt"):::projected
c4(["bd:serviceParam"]):::iri
c8(["el"]):::literal
c6(["en"]):::literal
c10(["it"]):::literal
c9(["es"]):::literal
v1 --"wdt:P8068"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P31".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 -."wikibase:language".-> c6
v3 --"rdfs:label"--> v4
end
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 -."wikibase:language".-> c6
v1 --"rdfs:label"--> v5
end
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 -."wikibase:language".-> c8
v1 --"rdfs:label"--> v6
end
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 -."wikibase:language".-> c9
v1 --"rdfs:label"--> v7
end
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 -."wikibase:language".-> c10
v1 --"rdfs:label"--> v8
end
end
bind1[/"?instLabel"/]
v4 --o bind1
bind1 --as--o v9