query-0c22eadfc2c8092e754d88bc73ddd07c

rq turtle/ttl

TODO

Use at

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 ?label (LANG(?label) AS ?lang) {
  ?item wdt:P31 wd:Q15731356;
        rdfs:label/^rdfs:label ?item2 .
  FILTER( STR( ?item ) < STR( ?item2 ) ) .
  FILTER EXISTS { ?item2 wdt:P31 wd:Q15731356 } .
  ?item rdfs:label ?label .
  ?item2 rdfs:label ?label .
} ORDER BY STR(?label)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v2("?item2"):::projected v1("?label"):::projected v4("?lang") a1((" ")) c2(["wd:Q15731356"]):::iri f0[[" "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P31"--> e0c2 e0v1("?item2"):::projected e0c2(["wd:Q15731356"]):::iri end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> c2 v2 --"wdt:P31"--> c2 f1[["str(?item) < str(?item2)"]] f1 --> v3 f1 --> v2 v3 --"wdt:P31"--> c2 v3 --"rdfs:label"--> a1 v2 --"rdfs:label"--> a1 v3 --"rdfs:label"--> v1 v2 --"rdfs:label"--> v1 bind2[/"?label"/] v1 --o bind2 bind2 --as--o v4