query-8345e5cbd56b330f896b8d8f47a3c74d
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?typeLabel ?location ?commCat ?sitelink
WHERE {
SERVICE wikibase:box {
?item wdt:P625 ?location .
bd:serviceParam wikibase:cornerSouthWest "Point(2.8 39.3)"^^geo:wktLiteral .
bd:serviceParam wikibase:cornerNorthEast "Point(2.9 39.5)"^^geo:wktLiteral .
}
OPTIONAL { ?item wdt:P31 ?type . }
OPTIONAL { ?item wdt:P373 ?commCat . }
OPTIONAL { ?sitelink schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/> }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
- https://www.wikidata.org/wiki/User:Bjohas/Request_a_query
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2017/05
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?commCat"):::projected
v1("?item"):::projected
v2("?location"):::projected
v5("?sitelink"):::projected
v3("?type")
c7([sPoint(2.9 39.5)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"]):::literal
c15(["en"]):::literal
c12([https://en.wikipedia.org/]):::iri
c3(["bd:serviceParam"]):::iri
c5([sPoint(2.8 39.3)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"]):::literal
subgraph s1["http://wikiba.se/ontology#box"]
style s1 stroke-width:4px;
v1 --"wdt:P625"--> v2
c3 --"wikibase:cornerSouthWest"--> c5
c3 --"wikibase:cornerNorthEast"--> c7
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P31".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P373".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."schema:about".-> v1
v5 --"schema:isPartOf"--> c12
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c3 --"wikibase:language"--> c15
end