query-c2e6d14d742c55eeafd6cdd28d8ad9aa
Tutti gli elementi interessati dall'import dal Sistema Cultura SELECT DISTINCT ?i ?iLabel ?iDescription ?coord ?inst ?instLabel ?instcoord ?tel WHERE { ?i p:P17 [ps:P17 ?c ; prov:wasDerivedFrom [pr:P248 wd:Q80199870] ] . ?i wdt:P131 ?inst . ?inst wdt:P625 ?instcoord . OPTIONAL { ?i wdt:P625 ?coord . } OPTIONAL { ?i wdt:P1329 ?tel . } FILTER(CONTAINS(STR(?tel),"+39-058")) BIND(IF(BOUND(?coord),'biblio','comune') AS ?layer) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". } } ORDER BY ?tel
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Tutti gli elementi interessati dall'import dal Sistema Cultura
SELECT DISTINCT ?i ?iLabel ?iDescription ?coord ?inst ?instLabel ?instcoord ?tel
WHERE {
?i p:P17 [ps:P17 ?c ; prov:wasDerivedFrom [pr:P248 wd:Q80199870] ] .
?i wdt:P131 ?inst .
?inst wdt:P625 ?instcoord .
OPTIONAL { ?i wdt:P625 ?coord . }
OPTIONAL { ?i wdt:P1329 ?tel . }
FILTER(CONTAINS(STR(?tel),"+39-058"))
BIND(IF(BOUND(?coord),'biblio','comune') AS ?layer)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". }
}
ORDER BY ?tel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?c")
v6("?coord"):::projected
v3("?i"):::projected
v4("?inst"):::projected
v5("?instcoord"):::projected
v7("?layer")
v1("?tel"):::projected
a1((" "))
a2((" "))
c13(["#91;AUTO_LANGUAGE#93;,it,en"]):::literal
c4(["wd:Q80199870"]):::iri
c11(["bd:serviceParam"]):::iri
f0[["contains(str(?tel),'+39-058')"]]
f0 --> v1
a1 --"p:statement/P17"--> v2
a2 --"p:reference/P248"--> c4
a1 --"prov:wasDerivedFrom"--> a2
v3 --"p:P17"--> a1
v3 --"p:direct/P131"--> v4
v4 --"p:direct/P625"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P625".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P1329".-> v1
end
bind1[/"if(bound(?coord),'biblio','comune')"/]
v6 --o bind1
bind1 --as--o v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end