query-626ca7ad5189a052c4b1a128ba12ab35
Sitelink name (i.e. EN article name on EN Wikipedia) to article URL and QId SELECT DISTINCT ?item ?itemLabel ?article ?sitelink WHERE { VALUES ?sitelink {"London"@en "New York"@en} ?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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Sitelink name (i.e. EN article name on EN Wikipedia) to article URL and QId
SELECT DISTINCT ?item ?itemLabel ?article ?sitelink
WHERE
{
VALUES ?sitelink {"London"@en "New York"@en}
?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
v3("?item"):::projected
v1("?sitelink"):::projected
c3([https://en.wikipedia.org/]):::iri
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?sitelink/]
bind0-->v1
bind00([sLondon^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>"])
bind00 --> bind0
bind01([sNew York^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>"])
bind01 --> bind0
v2 --"schema:about"--> v3
v2 --"schema:isPartOf"--> c3
v2 --"schema:name"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end