query-4d0c43e01f548153278a18f5bf1d39cb

rq turtle/ttl

title:Tipografe (stampatora, editora, libraia e stampatora-libraia) senza luogo di lavoro, CERL id optional SELECT ?tipografa ?tipografaLabel ?tipografaDescription ?luogo_lavLabel (URI(concat("https://data.cerl.org/thesaurus/",?cerl)) AS ?cerlURL) WHERE { ?tipografa wdt:P31 wd:Q5; wdt:P21 wd:Q6581072; wdt:P106 ?activity . values ?activity { wd:Q175151 wd:Q1229025 wd:Q998550 wd:Q2516866 wd:Q40881196 } MINUS {?tipografa wdt:P937 ?luogo_lav.} OPTIONAL {?tipografa wdt:P1871 ?cerl }

SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

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#>
#title:Tipografe (stampatora, editora, libraia e stampatora-libraia) senza luogo di lavoro, CERL id optional
SELECT ?tipografa ?tipografaLabel ?tipografaDescription ?luogo_lavLabel (URI(concat("https://data.cerl.org/thesaurus/",?cerl)) AS ?cerlURL)
WHERE 
{
  ?tipografa wdt:P31 wd:Q5; wdt:P21 wd:Q6581072; wdt:P106 ?activity .
  values ?activity { wd:Q175151 wd:Q1229025 wd:Q998550 wd:Q2516866 wd:Q40881196 }
MINUS {?tipografa wdt:P937 ?luogo_lav.}
  OPTIONAL {?tipografa wdt:P1871 ?cerl }

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?activity") v4("?cerl"):::projected v5("?cerlURL") v3("?luogo_lav") v1("?tipografa"):::projected c9(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q6581072"]):::iri v1 --"wdt:P31"--> c2 v1 --"wdt:P21"--> c4 v1 --"wdt:P106"--> v3 bind0[/VALUES ?activity/] bind0-->v3 bind00(["wd:Q175151"]) bind00 --> bind0 bind01(["wd:Q1229025"]) bind01 --> bind0 bind02(["wd:Q998550"]) bind02 --> bind0 bind03(["wd:Q2516866"]) bind03 --> bind0 bind04(["wd:Q40881196"]) bind04 --> bind0 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P937"--> v3 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1871".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end bind2[/"concat('https://data.cerl.org/thesaurus/',?cerl)"/] v4 --o bind2 bind2 --as--o v5