query-7ca02a2e193d834ebb9f1bba61366e6d
TODO
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#mappa dei Cartigli di Bologna senza voce su itwiki
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?comuneLabel ?itemcoord ?sitelink_it ?sitelink_en ?sitelink_fr WHERE {
{?item wdt:P31/wdt:P279* wd:Q811979} UNION {?item wdt:P31 wd:Q1437299 .}
?item p:P9327 ?statement0.
?statement0 (ps:P9327) _:anyValueP9327.
?item wdt:P131 ?comune .
?comune wdt:P625 ?comunecoord .
?item wdt:P625 ?itemcoord .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en, it, fr, es, de". }
MINUS {
?sitelink_it schema:about ?item;
schema:isPartOf <https://it.wikipedia.org/> .
}
optional {
?sitelink_fr schema:about ?item;
schema:isPartOf <https://fr.wikipedia.org/> .
}
optional {
?sitelink_en schema:about ?item;
schema:isPartOf <https://en.wikipedia.org/> .
}
}
ORDER BY DESC (?sitelinks)
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?comune")
v5("?comunecoord")
v2("?item"):::projected
v6("?itemcoord"):::projected
v9("?sitelink_en"):::projected
v8("?sitelink_fr"):::projected
v7("?sitelink_it"):::projected
v1("?sitelinks")
v3("?statement0")
a2((" "))
a1((" "))
c3(["wd:Q811979"]):::iri
c16([https://fr.wikipedia.org/]):::iri
c4(["wd:Q1437299"]):::iri
c15([https://it.wikipedia.org/]):::iri
c17([https://en.wikipedia.org/]):::iri
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en, it, fr, es, de"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P31"--> c4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c3
end
union0r <== or ==> union0l
end
v2 --"p:P9327"--> v3
v3 --"p:statement/P9327"--> a2
v2 --"p:direct/P131"--> v4
v4 --"p:direct/P625"--> v5
v2 --"p:direct/P625"--> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v7 --"schema:about"--> v2
v7 --"schema:isPartOf"--> c15
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v8 -."schema:about".-> v2
v8 --"schema:isPartOf"--> c16
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v9 -."schema:about".-> v2
v9 --"schema:isPartOf"--> c17
end