query-c102957631f53e7356e2bf7ccd894302

rq turtle/ttl

Lucca

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT ?item ?itemLabel ?itemDescription ?coord ?img ?com ?gmp ?ind ?wlm ?layer
WHERE {
  ?item (wdt:P131)* wd:Q13373 . 
  MINUS { { ?item wdt:P31 wd:Q1134686 . } UNION { ?item wdt:P31 wd:Q747074 . } }
  ?item wdt:P625 ?coord . 
  OPTIONAL {?item wdt:P18 ?img}
  OPTIONAL {?item wdt:P373 ?com}
  OPTIONAL {?item wdt:P3749 ?gmp}
  OPTIONAL {?item wdt:P6375 ?ind}
  BIND(IF(BOUND(?img) && BOUND(?com),"img & com exist",IF(BOUND(?com),"com exists",IF(BOUND(?img),"img exists","none"))) AS ?layer)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?com"):::projected v2("?coord"):::projected v5("?gmp"):::projected v3("?img"):::projected v6("?ind"):::projected v1("?item"):::projected v7("?layer"):::projected c14(["#91;AUTO_LANGUAGE#93;,it,en"]):::literal c4(["wd:Q1134686"]):::iri c12(["bd:serviceParam"]):::iri c2(["wd:Q13373"]):::iri c5(["wd:Q747074"]):::iri v1 --"wdt:P131"--> c2 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c5 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c4 end union0r <== or ==> union0l end end v1 --"wdt:P625"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P18".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P373".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P3749".-> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P6375".-> v6 end bind1[/"if(bound(?img)bound(?com),'img & com exist',if(bound(?com),'com exists',if(bound(?img),'img exists','none')))"/] v3 --o bind1 v4 --o bind1 bind1 --as--o v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end