query-abc75a1f96fb75709b79618d57b8a288

rq turtle/ttl

Archivi in Toscana con "Biblioteca" nell'etichetta SELECT DISTINCT ?i ?iLabel ?iDescription ?coord ?inst ?instLabel ?instcoord ?pea WHERE { ?i wdt:P31 wd:Q166118 . ?i rdfs:label ?iLabel . ?i (wdt:P131)* wd:Q1273 . ?i wdt:P131 ?inst . ?inst wdt:P625 ?instcoord . ?i wdt:P7764 ?pea . OPTIONAL { ?i wdt:P625 ?coord . } BIND(IF(BOUND(?coord),'archiv','comune') AS ?layer) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,it". } FILTER(LANG(?iLabel) = "en"). FILTER(CONTAINS(?iLabel,"Biblioteca")). }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Archivi in Toscana con "Biblioteca" nell'etichetta
SELECT DISTINCT ?i ?iLabel ?iDescription ?coord ?inst ?instLabel ?instcoord ?pea
WHERE {
  ?i wdt:P31 wd:Q166118 .
  ?i rdfs:label ?iLabel .
  ?i (wdt:P131)* wd:Q1273 . 
  ?i wdt:P131 ?inst .
  ?inst wdt:P625 ?instcoord .
  ?i wdt:P7764 ?pea .
  OPTIONAL { ?i wdt:P625 ?coord . }
  BIND(IF(BOUND(?coord),'archiv','comune') AS ?layer)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,it". }
  FILTER(LANG(?iLabel) = "en").
  FILTER(CONTAINS(?iLabel,"Biblioteca")).
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?coord"):::projected v2("?i"):::projected v1("?iLabel"):::projected v3("?inst"):::projected v4("?instcoord"):::projected v7("?layer") v5("?pea"):::projected c13(["#91;AUTO_LANGUAGE#93;,en,it"]):::literal c4(["wd:Q166118"]):::iri c11(["bd:serviceParam"]):::iri c7(["wd:Q1273"]):::iri f0[["contains(?iLabel,'Biblioteca')"]] f0 --> v1 f1[["?iLabel = 'en'"]] f1 --> v1 v2 --"wdt:P31"--> c4 v2 --"rdfs:label"--> v1 v2 --"wdt:P131"--> c7 v2 --"wdt:P131"--> v3 v3 --"wdt:P625"--> v4 v2 --"wdt:P7764"--> v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P625".-> v6 end bind2[/"if(bound(?coord),'archiv','comune')"/] v6 --o bind2 bind2 --as--o v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end