query-71f1a3582f07e308b573e4ee963d23c7
Numeration TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?id (COUNT(?thing) + 1 AS ?row)
WHERE
{
{
SELECT ?item ?id
WHERE
{
?item wdt:P9178 ?id .
} limit 300
} {
SELECT (?id AS ?id2)
WHERE
{
{
SELECT ?item ?id
WHERE
{
?item wdt:P9178 ?id .
} limit 300
} }
}
BIND (IF(?id2 > ?id, true, 1/0) AS ?thing)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?item ?itemLabel ?id
ORDER BY DESC(?id)
Query found at
- https://www.wikidata.org/wiki/User:Infovarius/Queries
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2021/04
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?id"):::projected
v3("?id2")
v2("?item"):::projected
v5("?row")
v4("?thing")
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P9178"--> v1
v2 --"wdt:P9178"--> v1
bind0[/"?id"/]
v1 --o bind0
bind0 --as--o v3
bind1[/"if(?id2 > ?id,'true^^xsd:boolean','1^^xsd:integer' / '0^^xsd:integer')"/]
v3 --o bind1
v1 --o bind1
bind1 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
bind3[/" + '1^^xsd:integer'"/]
null --o bind3
bind3 --as--o v5