query-30f36948fbbe869845479ed179cfdc2f
Martello Tower checks
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?locationLabel ?describedLabel ?coords ?gridref WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "en-gb,en,mul". }
{
SELECT DISTINCT ?item ?conservation ?location ?inception ?end ?use ?gridref ?coords ?described ?ordinal WHERE {
?item wdt:P31 wd:Q91285.
OPTIONAL {?item wdt:P31 wd:Q91285;
p:P31 [pq:P1545 ?ordinal]}
?item wdt:P17 wd:Q145.
OPTIONAL {?item wdt:P5816 ?conservation}
OPTIONAL {?item wdt:P131 ?location}
OPTIONAL {?item wdt:P571 ?inception}
OPTIONAL {?item wdt:P571 ?inception}
OPTIONAL {?item wdt:P576 ?end}
OPTIONAL {?item wdt:P613 ?gridref}
OPTIONAL {?item wdt:P625 ?coords}
OPTIONAL {?item wdt:P366 ?use}
#OPTIONAL {?item wdt:P7959 ?county}
OPTIONAL {?item wdt:P18 ?image}
OPTIONAL {?item wdt:P1343 ?described}
}
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?conservation")
v8("?coords"):::projected
v11("?described")
v6("?end")
v7("?gridref"):::projected
v10("?image")
v5("?inception")
v1("?item"):::projected
v4("?location")
v2("?ordinal")
v9("?use")
a1((" "))
c4(["en-gb,en,mul"]):::literal
c6(["wd:Q91285"]):::iri
c2(["bd:serviceParam"]):::iri
c10(["wd:Q145"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"p:direct/P31"--> c6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P31".-> c6
a1 --"p:qualifier/P1545"--> v2
v1 --"p:P31"--> a1
end
v1 --"p:direct/P17"--> c10
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P5816".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P131".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P571".-> v5
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P571".-> v5
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P576".-> v6
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P613".-> v7
end
subgraph optional7["(optional)"]
style optional7 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P625".-> v8
end
subgraph optional8["(optional)"]
style optional8 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P366".-> v9
end
subgraph optional9["(optional)"]
style optional9 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P18".-> v10
end
subgraph optional10["(optional)"]
style optional10 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P1343".-> v11
end