query-55b95e8b543026621a12f6170e39244c

rq turtle/ttl

title:All libraries (including subclass of library) in Marche SELECT DISTINCT ?item ?name ?cap WHERE { ?item (wdt:P131) wd:Q1279; (wdt:P31/(wdt:P279)) wd:Q7075. ?item wdt:P281 ?cap #restituisce tutte le righe con o senza cap, per avere solo quelle senza cap sostituire optional con minus. togliendo minus/optional e le graffe si ottengono solo le righe piene SERVICE wikibase:label { bd:serviceParam wikibase:language "it". ?item rdfs:label ?name. } } ORDER BY (?name)

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#>
#title:All libraries (including subclass of library) in Marche
SELECT DISTINCT ?item ?name ?cap WHERE {
  ?item (wdt:P131*) wd:Q1279;
    (wdt:P31/(wdt:P279*)) wd:Q7075.
 ?item wdt:P281 ?cap #restituisce tutte le righe con o senza cap, per avere solo quelle senza cap sostituire optional con minus. togliendo minus/optional e le graffe si ottengono solo le righe piene
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "it".
    ?item rdfs:label ?name.
  }
}
ORDER BY (?name)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?cap"):::projected v2("?item"):::projected v1("?name"):::projected a1((" ")) c5(["wd:Q7075"]):::iri c8(["bd:serviceParam"]):::iri c10(["it"]):::literal c2(["wd:Q1279"]):::iri v2 --"wdt:P131"--> c2 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c5 v2 --"wdt:P281"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 v2 --"rdfs:label"--> v1 end