query-cf9cfe443829c9fafc0f50b26b7dc153

rq turtle/ttl

Buildings on Park Avenue that don't have a street number SELECT DISTINCT ?object ?objectLabel ?voieLabel ?streetNumber WHERE { ?object wdt:P669 wd:Q109711 . ?object p:P669 ?voie . OPTIONAL { ?voie pq:P670 ?streetNumber } . FILTER (!BOUND(?streetNumber)) .

SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Buildings on Park Avenue that don't have a street number 
SELECT DISTINCT ?object ?objectLabel ?voieLabel ?streetNumber
WHERE {
  ?object wdt:P669 wd:Q109711 . 
  ?object p:P669 ?voie . 
  OPTIONAL { ?voie pq:P670 ?streetNumber } .
  FILTER (!BOUND(?streetNumber)) .

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "fr"
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?object"):::projected v1("?streetNumber"):::projected v3("?voie") c6(["bd:serviceParam"]):::iri c2(["wd:Q109711"]):::iri c8(["fr"]):::literal f0[["not bound(?streetNumber)"]] f0 --> v1 v2 --"p:direct/P669"--> c2 v2 --"p:P669"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P670".-> v1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end