query-8c6d4d35105df0b382e33884d309cf2e
TODO
Use at
- https://query.wikidata.org/sparql
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 ?id ?idLabel ?wikilink (concat('[', str(?wikilink) , '|' , str(?idLabel), ']') as ?title_new)
WHERE
{
?id wdt:P31 wd:Q34442 . # is a road
?id wdt:P17 wd:Q668 . # in India
?id wdt:P16 wd:Q1967342 . # in India
?wikilink schema:about ?id; schema:isPartOf <https://en.wikipedia.org/> .
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en','ml','hi' }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?id"):::projected
v3("?title_new")
v2("?wikilink"):::projected
c6(["wd:Q1967342"]):::iri
c15(["hi"]):::literal
c13(["en"]):::literal
c2(["wd:Q34442"]):::iri
c9([https://en.wikipedia.org/]):::iri
c11(["bd:serviceParam"]):::iri
c4(["wd:Q668"]):::iri
c14(["ml"]):::literal
v1 --"wdt:P31"--> c2
v1 --"wdt:P17"--> c4
v1 --"wdt:P16"--> c6
v2 --"schema:about"--> v1
v2 --"schema:isPartOf"--> c9
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
c11 --"wikibase:language"--> c14
c11 --"wikibase:language"--> c15
end
bind0[/"concat('#91;',str(?wikilink),'|',str(?idLabel),'#93;')"/]
v2 --o bind0
null --o bind0
bind0 --as--o v3