query-4a9fc683647ce89da4d70970703a266e
UNESCO World Heritage Sites (including Tentative)
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT ?item ?itemLabel ?itemDescription ?image (SAMPLE(?geo) AS ?geo) (SAMPLE(?pic) AS ?pic) (SAMPLE(?picAlbum) AS ?picAlbum) (SAMPLE(?article) AS ?article) WHERE {
{ ?item wdt:P4171 ?WorldHeritageTentative. }
UNION { ?item wdt:P757 ?WorldHeritage. }
UNION { ?item wdt:P31/wdt:P279* wd:Q9259.}
OPTIONAL { ?item wdt:P625 ?geo. }
OPTIONAL { ?item wdt:P18 ?pic. }
OPTIONAL { ?item wdt:P373 ?picAlbum. }
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en".
?item rdfs:label ?itemLabel;
schema:description ?itemDescription.
}
OPTIONAL {
?article schema:about ?item;
schema:isPartOf <https://en.wikipedia.org/>.
}
}
GROUP BY ?item ?itemLabel ?itemDescription ?image
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?WorldHeritage")
v2("?WorldHeritageTentative")
v10("?article"):::projected
v10("?geo"):::projected
v1("?item"):::projected
v8("?itemDescription"):::projected
v7("?itemLabel"):::projected
v10("?pic"):::projected
v10("?picAlbum"):::projected
a1((" "))
c12(["en"]):::literal
c17([https://en.wikipedia.org/]):::iri
c10(["bd:serviceParam"]):::iri
c5(["wd:Q9259"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P757"--> v3
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P4171"--> v2
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v10
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v10
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P373".-> v10
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
v1 --"rdfs:label"--> v7
v1 --"schema:description"--> v8
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v10 -."schema:about".-> v1
v10 --"schema:isPartOf"--> c17
end
bind4[/"sample(?geo)"/]
v10 --o bind4
bind4 --as--o v10
bind5[/"sample(?pic)"/]
v10 --o bind5
bind5 --as--o v10
bind6[/"sample(?picAlbum)"/]
v10 --o bind6
bind6 --as--o v10
bind7[/"sample(?article)"/]
v10 --o bind7
bind7 --as--o v10