query-d0749bcc20e6eb170dbedbf3b5fa17ac
This query favours people whose names start ABC &c over those starting XYZ &c. SELECT ?person ?sitelink ?article WHERE{ SERVICE bd:sample { ?person wdt:P21 wd:Q6581097 . bd:serviceParam bd:sample.limit 2000 . } ?person wdt:P31 wd:Q5 . ?sitelink schema:about ?person ; schema:isPartOf https://en.wikipedia.org/ ; schema:name ?article . } ORDER BY ?article LIMIT 100
Use at
- https://query.wikidata.org/sparql
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#>
#This query favours people whose names start ABC &c over those starting XYZ &c.
SELECT ?person ?sitelink ?article
WHERE{
SERVICE bd:sample {
?person wdt:P21 wd:Q6581097 .
bd:serviceParam bd:sample.limit 2000 .
}
?person wdt:P31 wd:Q5 .
?sitelink schema:about ?person ;
schema:isPartOf <https://en.wikipedia.org/> ;
schema:name ?article .
}
ORDER BY ?article LIMIT 100
Query found at
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/12
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/en
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/es
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/fr
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?article"):::projected
v2("?person"):::projected
v3("?sitelink"):::projected
c11([https://en.wikipedia.org/]):::iri
c4(["bd:serviceParam"]):::iri
c3(["wd:Q6581097"]):::iri
c8(["wd:Q5"]):::iri
c6(["2000^^xsd:integer"]):::literal
subgraph s1["http://www.bigdata.com/rdf#sample"]
style s1 stroke-width:4px;
v2 --"wdt:P21"--> c3
c4 --"bd:sample.limit"--> c6
end
v2 --"wdt:P31"--> c8
v3 --"schema:about"--> v2
v3 --"schema:isPartOf"--> c11
v3 --"schema:name"--> v1