query-e3209d11aae76744f73c52e6e95ce2f8
(P18)image Query con tutti i monumenti partecipanti nel 2019 provvisti o privi di
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT ?item ?itemLabel ?coord ?img ?layer
WHERE {
?item wdt:P131* wd:Q1273 .
?item wdt:P625 ?coord .
OPTIONAL { ?item wdt:P18 ?img . }
?item p:P2186 ?wlmst .
?wlmst ps:P2186 ?wlmid .
BIND(IF(BOUND(?img),'img','no img') AS ?layer)
MINUS {
?wlmst pqv:P580 [ wikibase:timeValue ?start ; wikibase:timePrecision ?sprec ] .
FILTER (
( ?sprec > 9 && ?start >= "2019-10-01T00:00:00+00:00"^^xsd:dateTime ) ||
( ?sprec < 10 && ?start >= "2020-01-01T00:00:00+00:00"^^xsd:dateTime )
)
}
MINUS {
?wlmst pqv:P582 [ wikibase:timeValue ?end ; wikibase:timePrecision ?eprec ] .
FILTER (
( ?eprec > 9 && ?end < "2019-09-01T00:00:00+00:00"^^xsd:dateTime ) ||
( ?eprec < 10 && ?end < "2019-01-01T00:00:00+00:00"^^xsd:dateTime )
)
}
MINUS {
?wlmst pq:P585 ?date .
FILTER ( ?date < "2019-01-01T00:00:00+00:00"^^xsd:dateTime || ?date >= "2020-01-01T00:00:00+00:00"^^xsd:dateTime )
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?coord"):::projected
v11("?date")
v10("?end")
v9("?eprec")
v3("?img"):::projected
v1("?item"):::projected
v6("?layer"):::projected
v7("?sprec")
v8("?start")
v5("?wlmid")
v4("?wlmst")
a1((" "))
a2((" "))
c21(["#91;AUTO_LANGUAGE#93;,it,en"]):::literal
c19(["bd:serviceParam"]):::iri
c2(["wd:Q1273"]):::iri
v1 --"p:direct/P131"--> c2
v1 --"p:direct/P625"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P18".-> v3
end
v1 --"p:P2186"--> v4
v4 --"p:statement/P2186"--> v5
bind0[/"if(bound(?img),'img','no img')"/]
v3 --o bind0
bind0 --as--o v6
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
f2[["(?sprec > '9^^xsd:integer'?start >= '2019-10-01T00:00:00+00:00^^xsd:dateTime' || ?sprec < '10^^xsd:integer'?start >= '2020-01-01T00:00:00+00:00^^xsd:dateTime')"]]
f2 --> v7
f2 --> v8
a1 --"wikibase:timeValue"--> v8
a1 --"wikibase:timePrecision"--> v7
v4 --"p:qualifier/value/P580"--> a1
end
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
f4[["(?eprec > '9^^xsd:integer'?end < '2019-09-01T00:00:00+00:00^^xsd:dateTime' || ?eprec < '10^^xsd:integer'?end < '2019-01-01T00:00:00+00:00^^xsd:dateTime')"]]
f4 --> v9
f4 --> v10
a2 --"wikibase:timeValue"--> v10
a2 --"wikibase:timePrecision"--> v9
v4 --"p:qualifier/value/P582"--> a2
end
subgraph minus5["MINUS"]
style minus5 stroke-width:6px,fill:pink,stroke:red;
f6[["(?date < '2019-01-01T00:00:00+00:00^^xsd:dateTime' || ?date >= '2020-01-01T00:00:00+00:00^^xsd:dateTime')"]]
f6 --> v11
v4 --"p:qualifier/P585"--> v11
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c19 --"wikibase:language"--> c21
end