query-cc6b4f653561c9e5663bae66e5f70326

rq turtle/ttl

title: Dutch government organizations missing Facebook with a link to search Facebook directly from WDQS SELECT DISTINCT ?item ?itemLabel (IRI(CONCAT(SUBSTR(?searchEndpoint,1,STRLEN(?searchEndpoint)-2), ?itemLabel)) AS ?URL) WHERE { wd:P2013 wikibase:directClaim ?wdt; # wd:P2013 == External identifier for Facebook wdt:P4354 ?searchEndpoint . ?item wdt:P31/wdt:P279* wd:Q2659904 ; wdt:P17 wd:Q55 . # wd:Q55 == The Netherlands MINUS { ?item ?wdt [] } MINUS { ?item wdt:P1366 [] } MINUS { ?item wdt:P576 [] } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],nl,en". } } ORDER BY ?itemLabel

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: Dutch government organizations missing Facebook with a link to search Facebook directly from WDQS
SELECT DISTINCT ?item ?itemLabel (IRI(CONCAT(SUBSTR(?searchEndpoint,1,STRLEN(?searchEndpoint)-2), ?itemLabel)) AS ?URL) WHERE {
  wd:P2013 wikibase:directClaim ?wdt; # wd:P2013 == External identifier for Facebook
           wdt:P4354 ?searchEndpoint .
  ?item wdt:P31/wdt:P279* wd:Q2659904 ;
        wdt:P17 wd:Q55 . # wd:Q55 == The Netherlands
  MINUS { ?item ?wdt [] }
  MINUS { ?item wdt:P1366 [] }
  MINUS { ?item wdt:P576 [] }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],nl,en". }
} ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?URL") v4("?item"):::projected v1("?itemLabel"):::projected v3("?searchEndpoint"):::projected v2("?wdt") a2((" ")) a3((" ")) a4((" ")) a1((" ")) c1(["wd:P2013"]):::iri c14(["#91;AUTO_LANGUAGE#93;,nl,en"]):::literal c8(["wd:Q55"]):::iri c6(["wd:Q2659904"]):::iri c12(["bd:serviceParam"]):::iri c1 --"wikibase:directClaim"--> v2 c1 --"wdt:P4354"--> v3 v4 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c6 v4 --"wdt:P17"--> c8 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v4 -->v2--> a2 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v4 --"wdt:P1366"--> a3 end subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v4 --"wdt:P576"--> a4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end bind3[/"concat(substring(?searchEndpoint,'1^^xsd:integer',string-length(?searchEndpoint) + '-2^^xsd:integer'),?itemLabel)"/] v3 --o bind3 v1 --o bind3 bind3 --as--o v5