query-0b84e13e98e64ed73e7b282f9f520bcd
11:53, 3 September 2017 (UTC)) talk (MultichillIf this can get fixed, than the next step would be to expand to other languages and/or aliases.
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 ?itemLabel
WHERE
{
?item wdt:P106 wd:Q1028181 .
?item rdfs:label ?itemLabel .
FILTER(LANG(?itemLabel) = "en") .
?item2 wdt:P106 wd:Q1028181 .
?item2 rdfs:label ?itemLabel .
FILTER(str(?item) < str(?item2))
}
LIMIT 1000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?item2"):::projected
v3("?itemLabel"):::projected
c3(["wd:Q1028181"]):::iri
f0[["str(?item) < str(?item2)"]]
f0 --> v1
f0 --> v2
f1[["?itemLabel = 'en'"]]
f1 --> v3
v1 --"wdt:P106"--> c3
v1 --"rdfs:label"--> v3
v2 --"wdt:P106"--> c3
v2 --"rdfs:label"--> v3