query-8ebacc901685f4efc69bd25f425ed0af

rq turtle/ttl

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

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#>
#Biblioteche in Toscana con "*omun*" nell'etichetta
SELECT DISTINCT ?i ?iLabel ?iDescription ?coord ?inst ?instLabel ?instcoord ?pea
WHERE {
  ?i wdt:P31 wd:Q7075 .
  ?i rdfs:label ?iLabel .
  ?i (wdt:P131)* wd:Q1273 . 
  ?i wdt:P131 ?inst .
  ?inst wdt:P625 ?instcoord .
  OPTIONAL { ?i wdt:P625 ?coord . }
  BIND(IF(BOUND(?coord),'biblio','comune') AS ?layer)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it". }
  FILTER(LANG(?iLabel) = "it").
  FILTER(CONTAINS(?iLabel,"omun")).
}

Query found at

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