query-0e204e4e519a56d9369a96a98607cce9
Propertiesinstance of (P31)sex or gender (P21)
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?article
WHERE
{
?item wdt:P31 wd:Q5 .
?item wdt:P21 wd:Q6581072 .
?article schema:about ?item .
?article schema:isPartOf <https://en.wikipedia.org/>.
bind(xsd:integer(strafter(str(?item), 'Q')) as ?id).
FILTER (?id > 50000000).
FILTER (?id < 60000000).
SERVICE wikibase:label {bd:serviceParam wikibase:language "en" }
}
LIMIT 20000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?article"):::projected
v4("?id")
v2("?item"):::projected
c13(["en"]):::literal
c6(["wd:Q6581072"]):::iri
c9([https://en.wikipedia.org/]):::iri
c11(["bd:serviceParam"]):::iri
c4(["wd:Q5"]):::iri
f0[["?id < '60000000^^xsd:integer'"]]
f0 --> v4
f1[["?id > '50000000^^xsd:integer'"]]
f1 --> v4
v2 --"wdt:P31"--> c4
v2 --"wdt:P21"--> c6
v3 --"schema:about"--> v2
v3 --"schema:isPartOf"--> c9
bind2[/"http://www.w3.org/2001/XMLSchema#integer(substring-after(str(?item),'Q'))"/]
v2 --o bind2
bind2 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end