query-a39e88aca076d12f91f8cb0c21f1b2e6

rq turtle/ttl

title: List of items based in France with a value for P3608 but no value for P1616 SELECT DISTINCT ?organisation ?organisationLabel ?numerotva ?siren ?url WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". } ?organisation wdt:P17 wd:Q142. MINUS { ?organisation wdt:P1616 _:b15. } ?organisation wdt:P3608 ?numerotva. BIND(SUBSTR( ?numerotva, 5, 9 ) AS ?siren) BIND(URI(CONCAT("https://annuaire-entreprises.data.gouv.fr/entreprise/", ?siren)) AS ?url) }

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: List of items based in France with a value for P3608 but no value for P1616
SELECT DISTINCT ?organisation ?organisationLabel ?numerotva ?siren ?url WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
  ?organisation wdt:P17 wd:Q142.
  MINUS { ?organisation wdt:P1616 _:b15. }
  ?organisation wdt:P3608 ?numerotva.
  BIND(SUBSTR( ?numerotva, 5, 9 ) AS ?siren)
  BIND(URI(CONCAT("https://annuaire-entreprises.data.gouv.fr/entreprise/", ?siren)) AS ?url)
  }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?numerotva"):::projected v1("?organisation"):::projected v3("?siren"):::projected v4("?url"):::projected a1((" ")) c2(["bd:serviceParam"]):::iri c4(["fr"]):::literal c6(["wd:Q142"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"wdt:P17"--> c6 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P1616"--> a1 end v1 --"wdt:P3608"--> v2 bind1[/"substring(?numerotva,'5^^xsd:integer','9^^xsd:integer')"/] v2 --o bind1 bind1 --as--o v3 bind2[/"concat('https://annuaire-entreprises.data.gouv.fr/entreprise/',?siren)"/] v3 --o bind2 bind2 --as--o v4