query-26b1c4981b4ef857db337029829b49af
TODO
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 wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?id
WHERE
{
# ?item wdt:P106 wd:Q82955. # restrict to occupation=politician (timeout precaution)
?item wdt:P31 wd:Q5. # humans
bind(xsd:integer(substr(str(?item),33)) as ?id) # get the numeric element of the QID, cast as an integer
filter(?id > 50984600) # filter out QIDs below a specified value
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;
v3("?id"):::projected
v2("?item"):::projected
c5(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?id > '50984600^^xsd:integer'"]]
f0 --> v3
v2 --"wdt:P31"--> c3
bind1[/"http://www.w3.org/2001/XMLSchema#integer(substring(str(?item),'33^^xsd:integer'))"/]
v2 --o bind1
bind1 --as--o v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end