query-999310aeed8dcb449f390819ae6f5b4d
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?i ?iLabel
WHERE {
{
SELECT ?c ?cLabel {
?c wdt:P131 ?a; wdt:P131 ?b.
wd:Q13410428 ^wdt:P31 ?a, ?b.
wd:Q1428 ^wdt:P131 ?a, ?b.
FILTER(STR(?a) < STR(?b))
}
}
?i wdt:P131/wdt:P131* ?c.
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;
v1("?a")
v2("?b")
v3("?c")
v4("?i"):::projected
a1((" "))
c6(["bd:serviceParam"]):::iri
c4(["wd:Q1428"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q13410428"]):::iri
f0[["str(?a) < str(?b)"]]
f0 --> v1
f0 --> v2
v3 --"wdt:P131"--> v1
v3 --"wdt:P131"--> v2
v1 --"wdt:P31"--> c3
v2 --"wdt:P31"--> c3
v1 --"wdt:P131"--> c4
v2 --"wdt:P131"--> c4
v4 --"wdt:P131"--> a1
a1 --"wdt:P131"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end