query-8019e66b3cc332016bc4f0c3138df15e
Optional Wikipedia links nl:Lijst van rijksmonumenten aan de BakenessergrachtI'm playing around with queries for Kartographer, see for example The normal query works: 200 LIMIT } ) ?title AS ) ?adres ,' - ' ),?label(STR ,' - ' ,?rijksmonumentid(CONCAT(BIND )'nl'=)?label(LANG( FILTER . ?label label:rdfs ; ?rijksmonumentid P359:wdt ; ?adres P6375:wdt ; Q916333:wd P1435:wdt ; Q1083850:wd P669:wdt ?id { WHERE ?title ?id SELECT And the one with links too:
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?id ?title WHERE {
?id wdt:P669 wd:Q1083850 ;
wdt:P1435 wd:Q916333 ;
wdt:P6375 ?adres ;
wdt:P359 ?rijksmonumentid ;
rdfs:label ?label .
FILTER (LANG(?label)='nl')
?article schema:about ?id ;
schema:isPartOf <https://nl.wikipedia.org/> ;
schema:name ?articlename .
BIND(CONCAT(?rijksmonumentid, ' - [[', STR(?articlename), '|', STR(?label), ']] - ', ?adres ) AS ?title )
#BIND(CONCAT(?rijksmonumentid, ' - ', STR(?label), ' - ', ?adres ) AS ?title )
} LIMIT 200
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?adres")
v5("?article")
v6("?articlename")
v2("?id"):::projected
v1("?label")
v4("?rijksmonumentid")
v7("?title"):::projected
c3(["wd:Q1083850"]):::iri
c5(["wd:Q916333"]):::iri
c11([https://nl.wikipedia.org/]):::iri
f0[["?label = 'nl'"]]
f0 --> v1
v2 --"wdt:P669"--> c3
v2 --"wdt:P1435"--> c5
v2 --"wdt:P6375"--> v3
v2 --"wdt:P359"--> v4
v2 --"rdfs:label"--> v1
v5 --"schema:about"--> v2
v5 --"schema:isPartOf"--> c11
v5 --"schema:name"--> v6
bind1[/"concat(?rijksmonumentid,' - #91;#91;',str(?articlename),'|',str(?label),'#93;#93; - ',?adres)"/]
v4 --o bind1
v6 --o bind1
v1 --o bind1
v3 --o bind1
bind1 --as--o v7