query-bc248944157169ac4a6b7e648c4245c8
Propertiesheritage designation (P1435)architect (P84)located in the administrative territorial entity (P131)image (P18)instance of (P31)coordinate location (P625)
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:ScatterChart
SELECT DISTINCT (?mapcolor as ?architect) ?towndescLabel (?buildings AS ?count) ?statloc WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
FILTER (?buildings > 5).
{
SELECT DISTINCT ?towndesc ?statloc ?mapcolor (COUNT(?monmnt) AS ?buildings)
WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
{?monmnt wdt:P1435 wd:Q10729054}.# UNION {?monmnt wdt:P1435 wd:Q10729125}.
?monmnt wdt:P1435 ?listAB.
?monmnt wdt:P84 ?architect.
?monmnt wdt:P131 ?towndesc. #wd:Q68816359.
#FILTER (?towndesc=wd:Q68826051).#Clacks wd:Q207268, Stirling Q217838 Glasgow Q55934339 Edinburgh Q2379199 Aberdeen Q62274582
optional {?monmnt wdt:P18 ?gotimg.}.
optional {?monmnt wdt:P31 ?placedesc.}
?towndesc wdt:P625 ?statloc.
?sitelink schema:about ?monmnt .
OPTIONAL {?articleEN schema:about ?monmnt . ?articleEN schema:isPartOf <https://en.wikipedia.org/> .}.
?architect rdfs:label ?mapcolor. FILTER(LANG(?mapcolor) = "en").
} GROUP BY ?towndesc ?statloc ?mapcolor
}
} ORDER BY ?mapcolor ?towndesc
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v12("?architect")
v11("?articleEN")
v12("?buildings"):::projected
v12("?count")
v7("?gotimg")
v5("?listAB")
v1("?mapcolor"):::projected
v4("?monmnt")
v8("?placedesc")
v10("?sitelink")
v9("?statloc"):::projected
v2("?towndesc")
c8(["wd:Q10729054"]):::iri
c16([https://en.wikipedia.org/]):::iri
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?buildings > '5^^xsd:integer'"]]
f0 --> v12
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
f1[["?mapcolor = 'en'"]]
f1 --> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
v4 --"wdt:P1435"--> c8
v4 --"wdt:P1435"--> v5
v4 --"wdt:P84"--> v12
v4 --"wdt:P131"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P18".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P31".-> v8
end
v2 --"wdt:P625"--> v9
v10 --"schema:about"--> v4
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v11 -."schema:about".-> v4
v11 --"schema:isPartOf"--> c16
end
v12 --"rdfs:label"--> v1
bind3[/"count(?monmnt)"/]
v4 --o bind3
bind3 --as--o v12
bind4[/"?mapcolor"/]
v1 --o bind4
bind4 --as--o v12
bind5[/"?buildings"/]
v12 --o bind5
bind5 --as--o v12