query-61f65e6fccdc5576efbeeec257822767
cementiris del Vallespir (label ca i fr)
SELECT ?item ?itemLabelca ?itemLabelfr ?mun ?munLabelca ?munLabelfr WHERE {
{?item wdt:P17 wd:Q142.
wd:Q15475 wdt:P150 ?mun.
{?item wdt:P131 ?mun.}
UNION
{?mun wdt:P206 ?item.}
}
UNION
{
{wd:Q15475 wdt:P206 ?item}
UNION
{?item wdt:P131 wd:Q15475}
}
?item wdt:P31 wd:Q39614.
SERVICE wikibase:label {
bd:serviceParam wikibase:language "ca" .
?item rdfs:label ?itemLabelca.
?mun rdfs:label ?munLabelca.
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "fr".
?item rdfs:label ?itemLabelfr.
?mun rdfs:label ?munLabelfr.
}
}
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#>
# cementiris del Vallespir (label ca i fr)
SELECT ?item ?itemLabelca ?itemLabelfr ?mun ?munLabelca ?munLabelfr WHERE {
{?item wdt:P17 wd:Q142.
wd:Q15475 wdt:P150 ?mun.
{?item wdt:P131* ?mun.}
UNION
{?mun wdt:P206 ?item.}
}
UNION
{
{wd:Q15475 wdt:P206 ?item}
UNION
{?item wdt:P131* wd:Q15475}
}
?item wdt:P31 wd:Q39614.
SERVICE wikibase:label {
bd:serviceParam wikibase:language "ca" .
?item rdfs:label ?itemLabelca.
?mun rdfs:label ?munLabelca.
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "fr".
?item rdfs:label ?itemLabelfr.
?mun rdfs:label ?munLabelfr.
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v3("?itemLabelca"):::projected
v5("?itemLabelfr"):::projected
v2("?mun"):::projected
v4("?munLabelca"):::projected
v6("?munLabelfr"):::projected
c14(["fr"]):::literal
c10(["bd:serviceParam"]):::iri
c3(["wd:Q15475"]):::iri
c8(["wd:Q39614"]):::iri
c12(["ca"]):::literal
c2(["wd:Q142"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P131"--> c3
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
c3 --"wdt:P206"--> v1
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P17"--> c2
c3 --"wdt:P150"--> v2
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P206"--> v1
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P131"--> v2
end
union2r <== or ==> union2l
end
end
union0r <== or ==> union0l
end
v1 --"wdt:P31"--> c8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
v1 --"rdfs:label"--> v3
v2 --"rdfs:label"--> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c14
v1 --"rdfs:label"--> v5
v2 --"rdfs:label"--> v6
end