query-5e7159a934eaa9e7b1f3b39ba932e6a9
QId to article URL & sitelink for EN wikipedia SELECT DISTINCT ?item ?itemLabel ?article ?sitelink WHERE { VALUES ?item {wd:Q84 wd:Q22654} # this could be a query yielding QIds ?article schema:about ?item ; schema:isPartOf https://en.wikipedia.org/ ; schema:name ?sitelink . SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# QId to article URL & sitelink for EN wikipedia
SELECT DISTINCT ?item ?itemLabel ?article ?sitelink
WHERE
{
VALUES ?item {wd:Q84 wd:Q22654} # this could be a query yielding QIds
?article schema:about ?item ;
schema:isPartOf <https://en.wikipedia.org/> ;
schema:name ?sitelink .
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;
v2("?article"):::projected
v1("?item"):::projected
v3("?sitelink"):::projected
c3([https://en.wikipedia.org/]):::iri
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?item/]
bind0-->v1
bind00(["wd:Q84"])
bind00 --> bind0
bind01(["wd:Q22654"])
bind01 --> bind0
v2 --"schema:about"--> v1
v2 --"schema:isPartOf"--> c3
v2 --"schema:name"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end