query-7e0bd4caade259b182163bc86f54a527
title:Hononym things in Luxembourg SELECT ?item1 ?item2 ?l WHERE { ?item1 wdt:P17 wd:Q32 . ?item2 wdt:P17 wd:Q32 . ?item1 rdfs:label ?l . FILTER(LANG(?l) = 'en') . ?item2 rdfs:label ?l . FILTER(LANG(?l) = 'en') . FILTER(?item1 != ?item2 && STR(?item1) < STR(?item2)) . } ORDER BY ?l
Use at
- https://query.wikidata.org/sparql
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#>
#title:Hononym things in Luxembourg
SELECT ?item1 ?item2 ?l
WHERE {
?item1 wdt:P17 wd:Q32 . ?item2 wdt:P17 wd:Q32 .
?item1 rdfs:label ?l . FILTER(LANG(?l) = 'en') .
?item2 rdfs:label ?l . FILTER(LANG(?l) = 'en') .
FILTER(?item1 != ?item2 && STR(?item1) < STR(?item2)) .
}
ORDER BY ?l
Query found at
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/Queries
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/sandbox
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item1"):::projected
v3("?item2"):::projected
v1("?l"):::projected
c3(["wd:Q32"]):::iri
f0[["?item1 != ?item2str(?item1) < str(?item2)"]]
f0 --> v2
f0 --> v3
f1[["?l = 'en'"]]
f1 --> v1
f2[["?l = 'en'"]]
f2 --> v1
v2 --"wdt:P17"--> c3
v3 --"wdt:P17"--> c3
v2 --"rdfs:label"--> v1
v3 --"rdfs:label"--> v1