query-71dbbd7d3def983dc3fdead142860f11

rq turtle/ttl

Dominic

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item1 ?item1Label ?item2 ?item2Label ?code {
  ?item1 wdt:P1225 ?code.
  ?item2 wdt:P1225 ?code.
  FILTER(STR(?item1) < STR(?item2))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?code"):::projected v1("?item1"):::projected v2("?item2"):::projected c3(["bd:serviceParam"]):::iri c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["str(?item1) < str(?item2)"]] f0 --> v1 f0 --> v2 v1 --"wdt:P1225"--> v3 v2 --"wdt:P1225"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c3 --"wikibase:language"--> c5 end