query-aacf850b66e1f1e956f9524f17800ef5
TODO
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#>
SELECT ?item ?item2 ?label1 WHERE {
{
SELECT DISTINCT ?item (STR(?_label) AS ?label1) {
?item wdt:P31 wd:Q15731356; rdfs:label ?_label .
}
}.
{
SELECT DISTINCT ?item2 (STR(?_label) AS ?label2) {
?item2 wdt:P31 wd:Q15731356; rdfs:label ?_label .
}
}.
FILTER( ?label1 = ?label2 ) .
FILTER( STR( ?item ) < STR( ?item2 ) ) .
} ORDER BY ?label1
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?_label")
v2("?item"):::projected
v3("?item2"):::projected
v6("?label1"):::projected
v6("?label2")
c2(["wd:Q15731356"]):::iri
f0[["str(?item) < str(?item2)"]]
f0 --> v2
f0 --> v3
f1[["?label1 = ?label2"]]
f1 --> v6
f1 --> v6
v2 --"wdt:P31"--> c2
v2 --"rdfs:label"--> v5
bind2[/"str(?_label)"/]
v5 --o bind2
bind2 --as--o v6
v3 --"wdt:P31"--> c2
v3 --"rdfs:label"--> v5
bind3[/"str(?_label)"/]
v5 --o bind3
bind3 --as--o v6