query-2b1bf3c0888405b608ba0813c629d825
.on Mastodon and on TwitterOriginally posted
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?version WHERE {
{
SELECT ?item ?version ?versionNumber WHERE {
?item wdt:P348 ?version.
BIND(xsd:integer(REPLACE(STRBEFORE(?version, "."), "^v", "")) AS ?versionNumber)
}
ORDER BY DESC(?versionNumber)
LIMIT 25
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?versionNumber)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v3("?version"):::projected
v4("?versionNumber")
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P348"--> v3
bind0[/"http://www.w3.org/2001/XMLSchema#integer(replace(substring-before(?version,'.'),'^v',''))"/]
v3 --o bind0
bind0 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end