query-4302c4767e2afaa705102321c1a574bd
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?s ?sLabel
WHERE {
{
SELECT ?a WHERE {
VALUES ?i { 0 1 2 3 4 5 6 7 8 9 }
{
SELECT ?j ?k WHERE {
VALUES ?j { 0 1 2 3 4 5 6 7 8 9 }
{
SELECT ?k WHERE {
VALUES ?k { 0 1 2 3 4 5 6 7 8 9 }
}
}
}
}
BIND((?k * 100 + ?j * 10 + ?i) AS ?a)
} ORDER BY DESC(?a)
}
VALUES ?start { 10 } # Start at this QID
BIND(URI(CONCAT("http://www.wikidata.org/entity/Q", STR(?start + ?a))) AS ?s)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
ORDER BY ?a
LIMIT 100 # List at most this many items
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?a")
v2("?i")
v3("?j")
v4("?k")
v6("?s"):::projected
v5("?start")
c2(["bd:serviceParam"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?i/]
bind0-->v2
bind00(["0^^xsd:integer"])
bind00 --> bind0
bind01(["1^^xsd:integer"])
bind01 --> bind0
bind02(["2^^xsd:integer"])
bind02 --> bind0
bind03(["3^^xsd:integer"])
bind03 --> bind0
bind04(["4^^xsd:integer"])
bind04 --> bind0
bind05(["5^^xsd:integer"])
bind05 --> bind0
bind06(["6^^xsd:integer"])
bind06 --> bind0
bind07(["7^^xsd:integer"])
bind07 --> bind0
bind08(["8^^xsd:integer"])
bind08 --> bind0
bind09(["9^^xsd:integer"])
bind09 --> bind0
bind1[/VALUES ?j/]
bind1-->v3
bind10(["0^^xsd:integer"])
bind10 --> bind1
bind11(["1^^xsd:integer"])
bind11 --> bind1
bind12(["2^^xsd:integer"])
bind12 --> bind1
bind13(["3^^xsd:integer"])
bind13 --> bind1
bind14(["4^^xsd:integer"])
bind14 --> bind1
bind15(["5^^xsd:integer"])
bind15 --> bind1
bind16(["6^^xsd:integer"])
bind16 --> bind1
bind17(["7^^xsd:integer"])
bind17 --> bind1
bind18(["8^^xsd:integer"])
bind18 --> bind1
bind19(["9^^xsd:integer"])
bind19 --> bind1
bind2[/VALUES ?k/]
bind2-->v4
bind20(["0^^xsd:integer"])
bind20 --> bind2
bind21(["1^^xsd:integer"])
bind21 --> bind2
bind22(["2^^xsd:integer"])
bind22 --> bind2
bind23(["3^^xsd:integer"])
bind23 --> bind2
bind24(["4^^xsd:integer"])
bind24 --> bind2
bind25(["5^^xsd:integer"])
bind25 --> bind2
bind26(["6^^xsd:integer"])
bind26 --> bind2
bind27(["7^^xsd:integer"])
bind27 --> bind2
bind28(["8^^xsd:integer"])
bind28 --> bind2
bind29(["9^^xsd:integer"])
bind29 --> bind2
bind3[/"?k * '100^^xsd:integer' + ?j * '10^^xsd:integer' + ?i"/]
v4 --o bind3
v3 --o bind3
v2 --o bind3
bind3 --as--o v5
bind4[/VALUES ?start/]
bind4-->v5
bind40(["10^^xsd:integer"])
bind40 --> bind4
bind5[/"concat('http://www.wikidata.org/entity/Q',str(?start + ?a))"/]
v5 --o bind5
v5 --o bind5
bind5 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end